Re: Improving OOM killer

Jiri Kosina
2010-02-04T09:50:56Z

On Wed, 3 Feb 2010, David Rientjes wrote:

> > > /* Forkbombs get penalized 10% of available RAM */
> > > if (forkcount > 500)
> > > points += 100;
> >
> > As far as I'm concerned, this is a huge improvement over the current code
> > (and, incidentally :), quite close to what I originally wanted). I'd be
> > willing to test it in few real-world desktop cases if you provide a patch.
[ ... ]
> Do you have any comments about the forkbomb detector or its threshold that
> I've put in my heuristic? I think detecting these scenarios is still an
> important issue that we need to address instead of simply removing it from
> consideration entirely.

Why does OOM killer care about forkbombs *at all*?

If we really want kernel to detect forkbombs (*), we'd have to establish
completely separate infrastructure for that (with its own knobs for tuning
and possibilities of disabling it completely).

The task of OOM killer is to find the process that caused the system
to run out of memory, and wipe it, it's as simple as that.

The connection to forkbombs seems to be so loose that I don't see it.

(*) How is forkbomb even defined? Where does the magic constant in
'forkcount > 500' come from? If your aim is to penalize server processes
on very loaded web/database servers, then this is probably correct
aproach. Otherwise, I don't seem to see the point.

Thanks,

--
Jiri Kosina
SUSE Labs, Novell Inc.