On Fri, May 21, 2021 at 08:14:03PM +0300, Andrei Borzenkov <arvidjaar@xxxxxxxxx> 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. system.slice:MemoryLow=A foo.service :MemoryLow=B // e.g. the compositor A < B - you get protection of A bytes against global reclaim - specifically A = 0 turns protection off A > B - you get protection of >=B bytes against global reclaim for foo.service - (A-B) bytes is spread among all children of system.slice (with memory_recursiveprot) - specifically B = 0 means foo.service shares the protection with all other services, it's not prioritized Then there's third relevant value C -- the typical workingset size of foo.service. You may get away with B < C. Certainly, you will need to experiment with this to determine good values that fit your setup. (I'm not familiar with Wayland but if it critically depends on some other services, you may need to protect them too.) GL;HF, Michal
Attachment:
signature.asc
Description: Digital signature
_______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel