Date: Wed, 24 Feb 2021 16:26:16 +0100 From: Walter von Entferndt <walter.von.entferndt@posteo.net> To: freebsd-hackers@freebsd.org Cc: Alan Somers <asomers@freebsd.org>, Konstantin Belousov <kostikbel@gmail.com>, Mark Millard <marklmi@yahoo.com> Subject: Re: The out-of-swap killer makes poor choices Message-ID: <9084784.RH3biPoPvx@t450s.local.lan> In-Reply-To: <mailman.21.1614168000.62837.freebsd-hackers@freebsd.org> References: <mailman.21.1614168000.62837.freebsd-hackers@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9084784.RH3biPoPvx>