I tried to configure cpu controller for each user logging in, in order to even out CPU usage. I am aware that such things can be done using systemd's pam module with the "controllers=" option. However, that pam module is included in multiple other pam files. So i searched for a more centralized place where i could configure it and stumbled upon logind.conf. Its man page talks about an option "Controllers=", which seems to have the same effect like the corresponding option of the pam module. However, "Controllers=cpu" has no effect. Looking at "/sys/fs/cgroups/cpu", i do not see any hierarchy with my username (which exists when configuring controllers via the pam module option).
In fact only *cpu* control group can not be configured with logind.conf. /etc/systemd/system.conf [Manager] DefaultControllers=cpu memory blkio JoinControllers=cpu,cpuacct,cpuset net_cls,net_prio /etc/systemd/logind.conf [Login] Controllers=cpu memory blkio ResetControllers= # login to system # cat /proc/self/cgroup 8:perf_event:/ 7:blkio:/user/max_posedon/c1 6:net_prio,net_cls:/ 5:freezer:/ 4:devices:/ 3:memory:/user/max_posedon/c1 2:cpuacct,cpu,cpuset:/ 1:name=systemd:/user/max_posedon/c1 As I see, it works with memory, and blkio, and don't with cpu.
# systemctl --version systemd 195 gentoo +PAM +LIBWRAP -AUDIT -SELINUX +IMA -SYSVINIT -LIBCRYPTSETUP +GCRYPT +ACL +XZ
I found, that created /cpu/user/<user> hierarchy completely not used. E.g. smth created it, but don't push there any tasks. m_melnikau-M11xR3 cgroup # cat ./systemd/user/max_posedon/1/tasks | wc -l 297 m_melnikau-M11xR3 cgroup # cat ./memory/user/max_posedon/1/tasks | wc -l 297 m_melnikau-M11xR3 cgroup # cat ./cpu/user/max_posedon/1/tasks | wc -l 0
Now that i tried again with systemd-204 it works for me with by setting "Controllers=cpu" and "ResetControllers=".
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.