Re: Protecting processes from the OOM killer

Dan Kegel
2003-02-28T15:48:36Z

Alan Cox wrote:
> On Fri, 2003-02-28 at 01:21, Dan Kegel wrote:
>
>>For a while now, I've been trying to figure out how
>>to make the oom killer not kill important processes.
>
>
> How about by not allowing your system to excessively overcommit.

(I'm using 2.4.18; is
http://www.kernel.org/pub/linux/kernel/people/rml/vm/strict-overcommit/v2.4/vm-strict-overcommit-rml-2.4.18-1.patch
still the approprate patch for that?)

> Everything else is armwaving "works half the time" stuff. By the time
> the OOM kicks in the game is already over.

Even with overcommit disallowed, the OOM killer is going to run
when my users try to run too big a job, so I would still like
the OOM killer to behave "well".

> The rlimit one doesnt deal
> with things like fork explosions where you have lots of processes
> all under 1/4 of the rlimit range who cumulatively overcommit. In
> fact you now pick harder on other tasks...

We do not see fork explosions in our workload, but if we did,
we could abuse the RSS limit for now by setting it to zero except for
the processes we wanted to protect from the OOM killer.
If that works in practice the same idea could be done without the abuse;
the RSS limit is just a handy knob.
- Dan

--
Dan Kegel