I’ve a jenkins server and running a lot of CPU bound compilations. I want to change the scheduler from SCHED_NORMAL to SCHED_BATCH. I know it can be done with chrt but I want the system to use it by default for all jenkins jobs (and perhaps all processes on the system).
How can I set SCHED_BATCH to be the default?
You can modify the systemd unit which starts Jenkins to set the CPU scheduling policy, using
Sets the CPU scheduling policy for executed processes. Takes one of
rr. See sched_setscheduler(2) for details.
So you might create a drop-in for your Jenkins systemd service with a path such as
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.