[systemd-devel] Rationale for mirroring cpu and systemd cgroup subsystems

Umut Tezduyar Lindskog umut at tezduyar.com
Wed Nov 5 04:41:37 PST 2014


Hi,

What is the reasoning for not joining cpu subsystem with systemd subsystem?

There are couple ways you can mirror [1] cpu and systemd subsystems
and doing so can result completely different cpu bandwidth for
processes.

I am wondering why we don't mirror them by default.

Not mirroring them results PID 1, each kernel thread and each user
space task having the same cpu bandwidth (/sys/fs/cgroup/cpu/tasks).
Even worse is the cpu bandwidth PID 1 gets goes down with the number
of processes spawned, possibly opening ways to DOS.

[1] - Simple changes that alter the entire cpu bandwidth processes get

a) DefaultCPUAccounting=yes will change the entire cpu bandwidth
allocation due to JoinControllers=cpu,cpuacct
b) Dropping a .slice and adding even only 1 service in it.
c) systemctl set-property system.slice CPUShares=1024 (Even though
1024 is the default cpu weight)

Umut


More information about the systemd-devel mailing list