On 12/21/20 8:28 AM, Ben Cotton wrote:
Be aware that if you intend to enable monitoring and actions on
user.slice, user-$UID.slice, or their ancestor cgroups, it is highly recommended that your
programs be managed by the systemd user manager to prevent running too many processes
under the same session scope (and thus avoid a situation where memory intensive tasks
trigger systemd-oomd to kill everything under the cgroup). If you're using a desktop
environment like GNOME, it already spawns many session components with the systemd user
manager.
This makes me slightly very concerned. According to cgls, I have most of
the apps running directly under user-$UID.slice -> session-X.scope. That
includes a compositor (sway) and a few applications that consume
uncomfortably close to 100% of available memory (firefox, thunderbird,
clangd, gcc, etc...).
My understanding is that unless I configure all of the above to run
under dedicated scopes, an attempt to run a memory-intensive task would
make systemd-oomd terminate the whole user slice with all my apps.
Is there anything that could be improved for that scenario? I don't
expect that all our desktop users would start using `systemd-run --scope
--user` to launch their applications.
--
With best regards,
Aleksei Bavshin