Re: Improving OOM killer

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Rientjes
Date: Thursday, February 11, 2010 - 2:17 pm

On Thu, 11 Feb 2010, Lubos Lunak wrote:


Your suggestion of summing up the memory of the parent and its children 
would clearly bias kdeinit if it forks most of kde's threads as you 
mentioned earlier in the thread.  Imagine it, or another server 
application that Rik mentioned, if all children are first generation: then 
it would always be selected if that it is the only task operating on the 
system.  For a web server, for instance, where each query is handled by a 
seperate thread, we'd obviously prefer to kill a child thread instead of 
making the entire server unresponsive.  That type of algorithm in the oom 
killer and to kill the parent instead is just a non-starter.


1 minute?  Unless you've got one of SGI's 4K cpu machines where these 1000 
threads would actually get any runtime _at_all_ in such circumstances, 
that threshold is unreasonable.

A valid point that wasn't raised is although we can't always detect out of 
control forking applications, we certainly should do some due diligence in 
making sure other applications aren't unfairly penalized when you do 
make -j100, for example.  That's not the job of the forkbomb detector in 
my heuristic, however, it's the job of the baseline itself.  In such 
scenarios (and when we can't allocate or free any memory), the baseline is 
responsible for identifying these tasks and killing them itself because 
they are using an excessive amount of memory.


Again, it's not protection against forkbombs: the oom killer is not the 
place where you want to enforce any policy that prohibits that.  


We're not protecting against a large number of first-generation children, 
we're simply penalizing them because the oom killer chooses to kill a 
large memory-hogging task instead of the parent first.  This shouldn't be 
described as "forkbomb detection" because thats outside the scope of the 
oom killer or VM, for that matter.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Improving OOM killer, Lubos Lunak, (Mon Feb 1, 3:02 pm)
Re: Improving OOM killer, David Rientjes, (Mon Feb 1, 4:53 pm)
Re: Improving OOM killer, Lubos Lunak, (Tue Feb 2, 2:10 pm)
Re: Improving OOM killer, David Rientjes, (Tue Feb 2, 6:41 pm)
Re: Improving OOM killer, KAMEZAWA Hiroyuki, (Tue Feb 2, 6:52 pm)
Re: Improving OOM killer, KAMEZAWA Hiroyuki, (Tue Feb 2, 7:12 pm)
Re: Improving OOM killer, David Rientjes, (Tue Feb 2, 7:12 pm)
[patch] sysctl: clean up vm related variable declarations, David Rientjes, (Tue Feb 2, 7:36 pm)
Re: Improving OOM killer, KOSAKI Motohiro, (Wed Feb 3, 12:50 am)
Re: Improving OOM killer, Balbir Singh, (Wed Feb 3, 1:57 am)
Re: Improving OOM killer, David Rientjes, (Wed Feb 3, 2:40 am)
Re: Improving OOM killer, Lubos Lunak, (Wed Feb 3, 5:10 am)
Re: Improving OOM killer, Balbir Singh, (Wed Feb 3, 5:25 am)
Re: Improving OOM killer, Rik van Riel, (Wed Feb 3, 7:49 am)
Re: Improving OOM killer, Minchan Kim, (Wed Feb 3, 8:00 am)
Re: Improving OOM killer, Minchan Kim, (Wed Feb 3, 9:06 am)
Re: Improving OOM killer, Balbir Singh, (Wed Feb 3, 10:01 am)
Re: Improving OOM killer, David Rientjes, (Wed Feb 3, 11:58 am)
Re: Improving OOM killer, Frans Pop, (Wed Feb 3, 12:29 pm)
Re: Improving OOM killer, David Rientjes, (Wed Feb 3, 12:52 pm)
Re: Improving OOM killer, Frans Pop, (Wed Feb 3, 1:12 pm)
Re: Improving OOM killer, David Rientjes, (Wed Feb 3, 1:26 pm)
Re: Improving OOM killer, Lubos Lunak, (Wed Feb 3, 2:22 pm)
Re: Improving OOM killer, Lubos Lunak, (Wed Feb 3, 3:54 pm)
Re: Improving OOM killer, Lubos Lunak, (Wed Feb 3, 3:55 pm)
Re: Improving OOM killer, David Rientjes, (Wed Feb 3, 5:00 pm)
Re: Improving OOM killer, David Rientjes, (Wed Feb 3, 5:05 pm)
Re: Improving OOM killer, Rik van Riel, (Wed Feb 3, 5:18 pm)
Re: Improving OOM killer, Lubos Lunak, (Thu Feb 4, 12:58 am)
Re: Improving OOM killer, Jiri Kosina, (Thu Feb 4, 2:50 am)
Re: Improving OOM killer, David Rientjes, (Thu Feb 4, 2:34 pm)
Re: Improving OOM killer, David Rientjes, (Thu Feb 4, 2:39 pm)
Re: Improving OOM killer, David Rientjes, (Thu Feb 4, 2:48 pm)
Re: Improving OOM killer, Rik van Riel, (Thu Feb 4, 3:06 pm)
Re: Improving OOM killer, David Rientjes, (Thu Feb 4, 3:14 pm)
Re: Improving OOM killer, Frans Pop, (Thu Feb 4, 3:31 pm)
Re: Improving OOM killer, David Rientjes, (Thu Feb 4, 3:53 pm)
Re: Improving OOM killer, Oliver Neukum, (Fri Feb 5, 12:35 am)
Re: Improving OOM killer, David Rientjes, (Tue Feb 9, 8:10 pm)
Re: Improving OOM killer, Lubos Lunak, (Wed Feb 10, 1:54 pm)
Re: Improving OOM killer, Lubos Lunak, (Wed Feb 10, 1:54 pm)
Re: Improving OOM killer, Rik van Riel, (Wed Feb 10, 2:09 pm)
Re: Improving OOM killer, Rik van Riel, (Wed Feb 10, 2:10 pm)
Re: Improving OOM killer, Lubos Lunak, (Wed Feb 10, 2:29 pm)
Re: Improving OOM killer, Lubos Lunak, (Wed Feb 10, 2:34 pm)
Re: Improving OOM killer, Alan Cox, (Wed Feb 10, 3:18 pm)
Re: Improving OOM killer, David Rientjes, (Wed Feb 10, 3:25 pm)
Re: Improving OOM killer, David Rientjes, (Wed Feb 10, 3:31 pm)
Re: Improving OOM killer, Lubos Lunak, (Thu Feb 11, 2:50 am)
Re: Improving OOM killer, Lubos Lunak, (Thu Feb 11, 3:16 am)
Re: Improving OOM killer, David Rientjes, (Thu Feb 11, 2:17 pm)