[systemd-devel] How to correctly use memory controls (MemoryLow) on unified hierarchy system?
Andrei Borzenkov
arvidjaar at gmail.com
Fri May 21 12:25:05 UTC 2021
systemd offers MemoryLow for an individual units. It actually sets
memory.low cgroup attribute, so this is OK. The problem is according to
kernel dcouemtation, memory.low is limited by value set in parent cgroup
and all parent cgroups have memory.low=0:
/sys/fs/cgroup/user.slice/user-1001.slice/user at 1001.service/gnome-shell-wayland.service/memory.low:536870912
/sys/fs/cgroup/user.slice/user-1001.slice/user at 1001.service/memory.low:0
/sys/fs/cgroup/user.slice/user-1001.slice/memory.low:0
/sys/fs/cgroup/user.slice/memory.low:0
which implies setting on lead cgroup has no effect.
Is it necessary to explicitly set it on every ancestor? There is no
clarification in systemd documentation and value is applied without any
warning.
More information about the systemd-devel
mailing list