SCHED_BATCH
also: SCHED_BATCH policy, batch scheduling
A Linux process scheduling class designed for batch jobs that are not time-sensitive and can tolerate longer latencies in exchange for better CPU cache efficiency and throughput.
SCHED_BATCH is a scheduling policy available through the Linux kernel's CFS (Completely Fair Scheduler) that optimizes for non-interactive workloads. When a process is assigned this policy, the kernel treats it as a background batch job that doesn't require quick response times.
Unlike SCHED_OTHER (the default), SCHED_BATCH processes are assumed to be non-interactive and are penalized when they wake up, reducing their priority boost. This prevents batch jobs from starving interactive applications while allowing batch processes to accumulate CPU time more efficiently without context switches.
Example use case: a data processing pipeline that computes results overnight. You might set it with chrt -b 0 ./batch_processor to use SCHED_BATCH at priority 0, ensuring it doesn't interfere with interactive user applications like text editors or browsers.