lkml.org 
[lkml]   [2009]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] oom_kill: use rss value instead of vm size for badness
On Thu, 29 Oct 2009 02:01:49 -0700 (PDT)
David Rientjes <rientjes@google.com> wrote:
> > yes, then I wrote "as start point". There are many environments.
>
> And this environment has a particularly bad result.
> yes, then I wrote "as start point". There are many environments.

In my understanding, 2nd, 3rd candidates are not important. If both of
total_vm and RSS catches the same process as 1st candidate, it's ok.
(i.e. If killed, oom situation will go away.)


> > ya, I'm now considering to drop file_rss from calculation.
> >
> > some reasons.
> >
> > - file caches remaining in memory at OOM tend to have some trouble to remove it.
> > - file caches tend to be shared.
> > - if file caches are from shmem, we never be able to drop them if no swap/swapfull.
> >
> > Maybe we'll have better result.
> >
>
> That sounds more appropriate.
>
> I'm surprised you still don't see a value in using the peak VM and RSS
> sizes, though, as part of your formula as it would indicate the proportion
> of memory resident in RAM at the time of oom.
>
I'll use swap_usage instead of peak VM size as bonus.

anon_rss + swap_usage/2 ? or some.

My first purpose is not to kill not-guilty process at random.
If memory eater is killed, it's reasnoable.

In my consideration

- "Killing a process because of OOM" is something bad, but not avoidable.

- We don't need to do compliated/too-wise calculation for killing a process.
"The worst one is memory-eater!" is easy to understand to users and admins.

- We have oom_adj, now. User can customize it if he run _important_ memory eater.

- But fork-bomb doesn't seem memory eater if we see each process.
We need some cares.

Then,
- I'd like to drop file_rss.
- I'd like to take swap_usage into acccount.
- I'd like to remove cpu_time bonus. runtime bonus is much more important.
- I'd like to remove penalty from children. To do that, fork-bomb detector
is necessary.
- nice bonus is bad. (We have oom_adj instead of this.) It should be
if (task_nice(p) < 0)
points /= 2;
But we have "root user" bonus already. We can remove this line.

After above, much more simple selection, easy-to-understand, will be done.

Thanks,
-Kame



\
 
 \ /
  Last update: 2009-10-29 10:21    [W:0.145 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site