The out-of-swap killer makes poor choices

Walter von Entferndt walter.von.entferndt at posteo.net
Wed Feb 24 15:26:32 UTC 2021


I'd like to suggest that it might be useful to add more (simple) criteria to apply ordered 
classes/queues to the list of processes that are candidates for beeing killed, similar to the 
time scheduler's runtime queues.  Then the (e)uid of the process comes to mind.  It's not 
expensive to check the processes' uid (or euid) and favour the so-called system users 
(usually uid <= 1000) over other (human) users; i.e. apply the order:
[humans] < [system] < [trad. daemons (uid <124)] < [root].
Then kill from the lowest queue (humans) before the next etc.pp.


Or use these classes to apply a weight to the processes' page count.
OTT, maybe it's ok to kill jails (or processes therein) before the host.


Such an addition could be simple, but efficiently give better choices.


Regards
-- 
=|o)  "Stell' Dir vor es geht und keiner kriegt's hin." (Wolfgang Neuss)


More information about the freebsd-hackers mailing list