[systemd-devel] Real-time scheduling doesn't work with StartupCPUWeight/CPUWeight

Lennart Poettering lennart at poettering.net
Sat Sep 17 16:01:22 UTC 2022


On Mi, 14.09.22 15:03, Robert Tiemann (rtie at gmx.de) wrote:

> Hi!
>
> I have optimized boot times for an embedded system by setting
> StartupCPUWeight= and CPUWeight= for a few services. The startup
> values are set to various values. All unit files I have touched also
> contain the line "CPUWeight=100" so that the system is running with
> defaults after startup. Some unit files contain Nice= assignments
> (placed there before my optimizations, so I kept them in place).
>
> Now, the problem is with one process in the system which requires
> real-time priorities. It calls pthread_setschedparam() to configure
> two of its threads for SCHED_RR policy at priority 99. This used to
> work before my optimizations, but now pthread_setschedparam() fails
> with EPERM error. I have added LimitRTPRIO=infinity, but it still
> doesn't work. The threads are created and configured after the startup
> phase has finished.

Please consult README, look for comment on CONFIG_RT_GROUP_SCHED=n.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list