Re: [systemd-devel] How to correctly use memory controls (MemoryLow) on unified hierarchy system?

2021-05-26 Thread Michal Koutný
On Fri, May 21, 2021 at 03:25:05PM +0300, Andrei Borzenkov wrote: > Is it necessary to explicitly set it on every ancestor? It depends against what reclaim you want to be protected. Global memory reclaim (running out of RAM) -> set it on every ancestor. Cgroup memory reclaim (hitting memory

Re: [systemd-devel] How to correctly use memory controls (MemoryLow) on unified hierarchy system?

2021-05-26 Thread Michal Koutný
On Fri, May 21, 2021 at 08:14:03PM +0300, Andrei Borzenkov wrote: > That's overkill for my purposes. This is single user system and all I am > trying to do is to prevent swapping out Wayland composer to avoid > waiting several minutes to unblank screen. I am fine with setting values > once.

Re: [systemd-devel] How to correctly use memory controls (MemoryLow) on unified hierarchy system?

2021-05-22 Thread Benjamin Berg
On Fri, 2021-05-21 at 20:14 +0300, Andrei Borzenkov wrote: > On 21.05.2021 17:07, Benjamin Berg wrote: > > [SNIP] > > Yes, you need to set it on all ancestors, and the documentation > > mentions this: > > > > """ > > For a protection to be effective, it is generally required to > > set a

Re: [systemd-devel] How to correctly use memory controls (MemoryLow) on unified hierarchy system?

2021-05-21 Thread Andrei Borzenkov
On 21.05.2021 17:07, Benjamin Berg wrote: > Hi, > > On Fri, 2021-05-21 at 15:25 +0300, Andrei Borzenkov wrote: >> 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

Re: [systemd-devel] How to correctly use memory controls (MemoryLow) on unified hierarchy system?

2021-05-21 Thread Benjamin Berg
Hi, On Fri, 2021-05-21 at 15:25 +0300, Andrei Borzenkov wrote: > 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

[systemd-devel] How to correctly use memory controls (MemoryLow) on unified hierarchy system?

2021-05-21 Thread Andrei Borzenkov
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: