[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20091029181650.979bf95c.kamezawa.hiroyu@jp.fujitsu.com>
Date: Thu, 29 Oct 2009 18:16:50 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: David Rientjes <rientjes@...gle.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Hugh Dickins <hugh.dickins@...cali.co.uk>,
Andrea Arcangeli <aarcange@...hat.com>, vedran.furac@...il.com,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Subject: Re: [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@...gle.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists