[systemd-devel] set rr scheduler failed with cpushares

Lennart Poettering lennart at poettering.net
Tue Dec 2 10:12:18 PST 2014

On Mon, 17.11.14 23:46, WaLyong Cho (walyong.cho at samsung.com) wrote:

> Hello,
> I'd made two different services. One has *CPUSchedulingPolicy=rr* and
> the others has *CPUShares=*.
> Could anyone help me?

If CPUShares= is set this has the effect that the service and all
services in the same slice will be have the "cpu" cgroup controller
turned on. Unfortunately this has the effect that RT scheduling will
be unavailable then, unless an explicit RT budget is configured for
that specific cgroup. This is something systemd cannot be used for
nicely however, as we don't expose high-level controls for the RT

The RT budget is configured in the cpu.rt_runtime_us and
cpu.rt_period_us cgroup attributes. You can write to them from
ExecStartPre= for example using the %c specified.

Another option is to simply disable CONFIG_RT_GROUP_SCHED in the
kernel, if you don't need it anyway.


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list