Re: Improving OOM killer

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Rientjes
Date: Wednesday, February 3, 2010 - 12:52 pm

On Wed, 3 Feb 2010, Frans Pop wrote:


I thought about whether we'd need an additional, complementary tunable 
such as /proc/pid/oom_bias that would effect this new memory-charging bias 
in the heuristic.  It could be implemented so that writing to oom_adj 
would clear oom_bias and vice versa.

Although that would certainly be possible, I didn't propose it for a 
couple of reasons:

 - it would clutter the space to have two seperate tunables when the 
   metrics that /proc/pid/oom_adj uses has become obsolete by the new
   baseline as a fraction of total RAM, and

 - we have always exported OOM_DISABLE, OOM_ADJUST_MIN, and OOM_ADJUST_MAX
   via include/oom.h so that userspace should use them sanely.  Setting
   a particular oom_adj value for anything other than OOM_DISABLE means 
   the score will be relative to other system tasks, so its a value that 
   is typically calibrated at runtime rather than static, hardcoded 
   values.

We could reuse /proc/pid/oom_adj for the new heuristic by severely 
reducing its granularity than it otherwise would by doing
(oom_adj * 1000 / OOM_ADJUST_MAX), but that will eventually become 
annoying and much more difficult to document.

Given your citation, I don't think we've ever described /proc/pid/oom_adj 
outside of the implementation as a bitshift, either.  So its use right now 
for anything other than OOM_DISABLE is probably based on scalar thinking.
--
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)