Re: Improving OOM killer

David Rientjes
2010-02-10T03:10:20Z

On Fri, 5 Feb 2010, Oliver Neukum wrote:

> > That's what we're trying to do, we can look at the shear number of
> > children that the parent has forked and check for it to be over a certain
> > "forkbombing threshold" (which, yes, can be tuned from userspace), the
> > uptime of those children, their resident set size, etc., to attempt to
> > find a sane heuristic that penalizes them.
>
> Wouldn't it be saner to have a selection by user, so that users that
> are over the overcommit limit are targeted?
>

It's rather unnecessary for the forkbomb case because then it would
unfairly penalize any user that runs lots of tasks. The forkbomb handling
code is really to prevent either user error, bugs in the application, or
maliciousness. The goal isn't necessarily to kill anything that forks an
egregious amount of tasks (which is why we always prefer a child with a
seperate address space than a parent, anyway) but rather to try to make
sure the system is still usable and recoverable.