lkml.org 
[lkml]   [2010]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Improving OOM killer
On Wed, 10 Feb 2010, Alan Cox wrote:

> One of the problems with picking on tasks that fork a lot is that
> describes apache perfectly. So a high loaded apache will get shot over a
> rapid memory eating cgi script.
>

With my rewrite, the oom killer would not select apache but rather the
child with a seperate address space that is consuming the most amount of
allowed memory and only when a configurable number of such children (1000
by default) have not had any runtime. My heuristic is only meant to
slightly penalize such tasks so that they can be distinguished from oom
kill from other parents with comparable memory usage. Enforcing a strict
forkbomb policy is out of the scope of the oom killer, though, so no
attempt was made.

> Any heuristic is going to be iffy - but that isn't IMHO a good one to
> work from. If anything "who allocated lots of RAM recently" may be a
> better guide but we don't keep stats for that.
>

That's what my heuristic basically does, if a parent is identified as a
forkbomb, then it is only penalized by averaging the memory consumption of
those children and then multiplying it by the same number of times the
configurable forkbomb threshold was reached.


\
 
 \ /
  Last update: 2010-02-10 23:35    [W:0.050 / U:18.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site