linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: David Rientjes <rientjes@google.com>
Cc: vedran.furac@gmail.com, Hugh Dickins <hugh.dickins@tiscali.co.uk>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	minchan.kim@gmail.com, Andrew Morton <akpm@linux-foundation.org>,
	Andrea Arcangeli <aarcange@redhat.com>
Subject: Re: Memory overcommit
Date: Fri, 30 Oct 2009 18:36:38 +0900	[thread overview]
Message-ID: <20091030183638.1125c987.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0910300200170.18076@chino.kir.corp.google.com>

On Fri, 30 Oct 2009 02:10:37 -0700 (PDT)
David Rientjes <rientjes@google.com> wrote:

> >    - The kernel can't know the program is bad or not. just guess it.
> 
> Totally irrelevant, given your fourth point about /proc/pid/oom_adj.  We 
> can tell the kernel what we'd like the oom killer behavior should be if 
> the situation arises.
> 

My point is that the server cannot distinguish memory leak from intentional
memory usage. No other than that.



> >    - Then, there is no "correct" OOM-Killer other than fork-bomb killer.
> 
> Well of course there is, you're seeing this is a WAY too simplistic 
> manner.  If we are oom, we want to be able to influence how the oom killer 
> behaves and respond to that situation.  You are proposing that we change 
> the baseline for how the oom killer selects tasks which we use CONSTANTLY 
> as part of our normal production environment.  I'd appreciate it if you'd 
> take it a little more seriously.
> 
Yes, I'm serious.

In this summer, at lunch with a daily linux user, I was said
"you, enterprise guys, don't consider desktop or laptop problem at all."
yes, I use only servers. My customer uses server, too. My first priority
is always on server users.
But, for this time, I wrote reply to Vedran and try to fix desktop problem.
Even if current logic works well for servers, "KDE/GNOME is killed" problem
seems to be serious. And this may be a problem for EMBEDED people, I guess.


> >    - User has a knob as oom_adj. This is very strong.
> > 
> 
> Agreed.
> 
This and memcg are very useful. But everone says "bad workaround" ;(
Maybe only servers can use these functions.

> > Then, there is only "reasonable" or "easy-to-understand" OOM-Kill.
> > "Current biggest memory eater is killed" sounds reasonable, easy to
> > understand. And if total_vm works well, overcommit_guess should catch it.
> > Please improve overcommit_guess if you want to stay on total_vm.
> > 
> 
> I don't necessarily want to stay on total_vm, but I also don't want to 
> move to rss as a baseline, as you would probably agree.
> 
I'll rewrite all. I'll not rely only on rss. There are several situations
and we need some more information than we have know. I'll have to implement
ways to gather information before chaging badness.


> We disagree about a very fundamental principle: you are coming from a 
> perspective of always wanting to kill the biggest resident memory eater 
> even for a single order-0 allocation that fails and I'm coming from a 
> perspective of wanting to ensure that our machines know how the oom killer 
> will react when it is used. 
yes.

> Moving to rss reduces the ability of the user to specify an expected oom
> priority other than polarizing it by either 
> disabling it completely with an oom_adj value of -17 or choosing the 
> definite next victim with +15.  That's my objection to it: the user cannot 
> possibly be expected to predict what proportion of each application's 
> memory will be resident at the time of oom.
> 
I can say the same thing to total_vm size. total_vm size doesn't include any
good information for oom situation. And tweaking based on that not-useful
parameter will make things worse.

For oom_adj tweak, we may need other technique other than "shift".
If I've wrote oom_adj, I'll write it as

   /proc/<pid>/guarantee_nooom_size

  #echo 3G > /proc/<pid>/guarantee_nooom_size

  Then, 3G bytes of this process's memory usage will not be accounted to badness.

I'm not sure I can add new interface or replace oom_adj, now.
But to do this, current chilren's score problem etc...should be fixed.

> I understand you want to totally rewrite the oom killer for whatever 
> reason, but I think you need to spend a lot more time understanding the 
> needs that the Linux community has for its behavior instead of insisting 
> on your point of view.
> 
yes, use more time. I don't think all of changes can be in quick work.

To be honest, this is a part of work to implement "custom oom handler" cgroup.
Before going further, I'd like to fix current problem.

Thanks,
-Kame


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2009-10-30  9:39 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <hav57c$rso$1@ger.gmane.org>
     [not found] ` <20091013120840.a844052d.kamezawa.hiroyu@jp.fujitsu.com>
     [not found]   ` <hb2cfu$r08$2@ger.gmane.org>
     [not found]     ` <20091014135119.e1baa07f.kamezawa.hiroyu@jp.fujitsu.com>
2009-10-20 21:52       ` Vedran Furač
2009-10-26  1:55         ` KAMEZAWA Hiroyuki
2009-10-26 16:16           ` Vedran Furač
2009-10-27  3:22             ` KAMEZAWA Hiroyuki
2009-10-27  6:10               ` KOSAKI Motohiro
2009-10-27  6:34                 ` Minchan Kim
2009-10-27  6:36                   ` KAMEZAWA Hiroyuki
2009-10-27  6:55                     ` Minchan Kim
2009-10-27  7:45                       ` [RFC][PATCH] oom_kill: avoid depends on total_vm and use real RSS/swap value for oom_score (Re: " KAMEZAWA Hiroyuki
2009-10-27  7:56                         ` Minchan Kim
2009-10-27 12:38                           ` Andrea Arcangeli
2009-10-28  0:22                             ` KAMEZAWA Hiroyuki
2009-10-28  0:45                               ` Vedran Furač
2009-10-27  7:56                         ` KAMEZAWA Hiroyuki
2009-10-27  8:14                           ` Minchan Kim
2009-10-27  8:33                             ` KAMEZAWA Hiroyuki
2009-10-27  8:52                               ` Minchan Kim
2009-10-27  8:56                                 ` KAMEZAWA Hiroyuki
2009-10-27 17:41                         ` Vedran Furač
2009-10-28  0:13                           ` KAMEZAWA Hiroyuki
2009-10-27 18:39                         ` Hugh Dickins
2009-10-27 18:47                           ` Andrea Arcangeli
2009-10-28  0:32                             ` KAMEZAWA Hiroyuki
2009-11-05 19:02                             ` Pavel Machek
2009-10-28  0:28                           ` KAMEZAWA Hiroyuki
2009-10-27  6:46                   ` KOSAKI Motohiro
2009-10-27  6:56                     ` Minchan Kim
2009-10-27 17:12               ` Vedran Furač
2009-10-27 18:02                 ` KOSAKI Motohiro
2009-10-27 18:30                   ` Vedran Furač
2009-10-27 20:44               ` Hugh Dickins
2009-10-27 21:04                 ` David Rientjes
2009-10-28  0:08                   ` Vedran Furač
2009-10-28  0:25                     ` David Rientjes
2009-10-28  0:39                       ` Vedran Furač
2009-10-28  4:08                         ` David Rientjes
2009-10-28  4:55                           ` KAMEZAWA Hiroyuki
2009-10-28  5:13                             ` David Rientjes
2009-10-28  6:05                               ` KAMEZAWA Hiroyuki
2009-10-28  6:17                                 ` David Rientjes
2009-10-28  6:20                                   ` KAMEZAWA Hiroyuki
2009-10-29  8:38                                     ` David Rientjes
2009-10-29 11:11                                       ` Vedran Furač
2009-10-29 19:53                                         ` David Rientjes
2009-10-29 23:48                                           ` KAMEZAWA Hiroyuki
2009-10-30  9:10                                             ` David Rientjes
2009-10-30  9:36                                               ` KAMEZAWA Hiroyuki [this message]
2009-11-03 20:49                                                 ` David Rientjes
2009-11-04  0:50                                                   ` KAMEZAWA Hiroyuki
2009-11-04  1:58                                                     ` David Rientjes
2009-11-04  2:17                                                       ` KAMEZAWA Hiroyuki
2009-11-04  3:10                                                         ` David Rientjes
2009-11-04  3:19                                                           ` KAMEZAWA Hiroyuki
2009-10-30 13:59                                           ` Vedran Furač
2009-10-30 19:24                                             ` David Rientjes
2009-11-02 19:58                                               ` Vedran Furač
2009-10-28 13:28                           ` Vedran Furač
2009-10-28 20:10                             ` David Rientjes
2009-10-29  3:05                               ` Vedran Furač
2009-10-29  8:35                                 ` David Rientjes
2009-10-29 11:01                                   ` Vedran Furač
2009-10-29 19:42                                     ` David Rientjes
2009-10-30 13:53                                       ` Vedran Furač
2009-10-30 14:08                                         ` Thomas Fjellstrom
2009-10-30 15:13                                           ` Vedran Furač
2009-10-30 14:12                                         ` Andrea Arcangeli
2009-10-30 14:41                                           ` Vedran Furač
2009-10-30 15:15                                             ` Andrea Arcangeli
2009-10-30 16:24                                               ` Hugh Dickins
2009-11-02 19:56                                               ` Vedran Furač
2009-10-30 19:44                                         ` David Rientjes
2009-11-02 19:56                                           ` Vedran Furač
2009-10-28  0:43                 ` KAMEZAWA Hiroyuki
2009-10-28  2:47                 ` KOSAKI Motohiro
2009-10-28  3:17                   ` KAMEZAWA Hiroyuki
2009-10-28  4:12                   ` David Rientjes
2009-10-28  8:10                     ` Hugh Dickins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091030183638.1125c987.kamezawa.hiroyu@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hugh.dickins@tiscali.co.uk \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan.kim@gmail.com \
    --cc=rientjes@google.com \
    --cc=vedran.furac@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox