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 CPUSchedulingPolicy=.

Sets the CPU scheduling policy for executed processes. Takes one of other, batch, idle, fifo or rr. See sched_setscheduler(2) for details.

So you might create a drop-in for your Jenkins systemd service with a path such as /etc/systemd/system/jenkins.service.d/scheduler.conf:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.