diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-09-30 11:23:32 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-10-04 16:27:10 +0200 |
commit | ce7de0ba8ef355c5119e7dffc46e075b257dc90d (patch) | |
tree | ab5c36713182e95c31827af104d490857993c1ab /units | |
parent | d4a402e4f6935cd7fa9ae8ea01b30944d9fcb3d0 (diff) | |
download | systemd-ce7de0ba8ef355c5119e7dffc46e075b257dc90d.tar.gz |
units: run user service managers at OOM score adjustment 100
Let's make it slightly more likely that a per-user service manager is
killed than any system service. We use a conservative 100 (from a range
that goes all the way to 1000).
Replaces: #17426
Together with the previous commit this means: system manager and system
services are placed at OOM score adjustment 0 (specifically: they
inherit kernel default of 0). User service manager (both for root and
non-root) are placed at 100. User services for non-root are placed at
200, those for root inherit 100.
Note that processes forked off the user *sessions* (i.e. not forked off
the per-user service manager) remain at 0 (e.g. the shell process
created by a tty or ssh login). This probably should be
addressed too one day (maybe in pam_systemd?), but is not covered here.
Diffstat (limited to 'units')
-rw-r--r-- | units/user@.service.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/units/user@.service.in b/units/user@.service.in index fec9afe130..85fc3c907e 100644 --- a/units/user@.service.in +++ b/units/user@.service.in @@ -25,3 +25,4 @@ Delegate=pids memory TasksMax=infinity TimeoutStopSec=120s KeyringMode=inherit +OOMScoreAdjust=100 |