Andrei Borzenkov
2021-05-21 12:25:05 UTC
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/***@1001.service/gnome-shell-wayland.service/memory.low:536870912
/sys/fs/cgroup/user.slice/user-1001.slice/***@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.
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/***@1001.service/gnome-shell-wayland.service/memory.low:536870912
/sys/fs/cgroup/user.slice/user-1001.slice/***@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.