From: David Rientjes <rientjes@google.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@redhat.com>, Nick Piggin <npiggin@suse.de>,
Balbir Singh <balbir@linux.vnet.ibm.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
linux-mm@kvack.org
Subject: Re: [patch 00/10 -mm v3] oom killer rewrite
Date: Tue, 16 Mar 2010 18:21:21 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.00.1003161813340.14676@chino.kir.corp.google.com> (raw)
In-Reply-To: <20100312164642.2757ec6c.kamezawa.hiroyu@jp.fujitsu.com>
On Fri, 12 Mar 2010, KAMEZAWA Hiroyuki wrote:
> One question. Assume a host A and B. A has 4G memory, B has 8G memory.
>
> Here, an applicaton which consumes 2G memory.
>
> Then, this application's oom_score will be 500 on A, 250 on B.
>
Right.
> How admin detemine the best oom_score_adj value ? Does it depend on envrionment
> even if runnning the same application ?
>
Yes, because the idea of /proc/pid/oom_score_adj is to allow userspace to
both set priorities for oom killing and also define when a task has become
a memory leaker (i.e. using far more memory than expected). You can't use
a quantity of memory to either prefer or bias an application because you
don't know its memory usage in context of the system, memcg, mempolicy, or
cpuset: a bias of 1G would mean "always kill this task" in a cpuset with a
512MB node whereas it would mean relatively nothing on a 64GB machine.
With a proportion, however, you could easily set a oom_score_adj of 250,
for example, to say this application should be penalized 25% of available
memory regardless of whether that's the entire system or a "virtual
system" consisting of a cpuset, memcg, or mempolicy.
It would obviously be trivial to add another /proc/pid knob that would
calculate the value for you given a quantity based on the memory
constraints of pid, I'm not against that addition.
--
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>
prev parent reply other threads:[~2010-03-17 1:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-10 10:41 David Rientjes
2010-03-10 10:41 ` [patch 01/10 -mm v3] oom: filter tasks not sharing the same cpuset David Rientjes
2010-03-10 10:41 ` [patch 02/10 -mm v3] oom: sacrifice child with highest badness score for parent David Rientjes
2010-03-10 10:41 ` [patch 03/10 -mm v3] oom: select task from tasklist for mempolicy ooms David Rientjes
2010-03-10 10:41 ` [patch 04/10 -mm v3] oom: remove special handling for pagefault ooms David Rientjes
2010-03-10 10:41 ` [patch 05/10 -mm v3] oom: badness heuristic rewrite David Rientjes
2010-03-12 6:20 ` KAMEZAWA Hiroyuki
2010-03-17 1:26 ` David Rientjes
2010-03-17 1:44 ` KAMEZAWA Hiroyuki
2010-03-17 3:30 ` David Rientjes
2010-03-10 10:41 ` [patch 06/10 -mm v3] oom: deprecate oom_adj tunable David Rientjes
2010-03-10 10:41 ` [patch 07/10 -mm v3] oom: replace sysctls with quick mode David Rientjes
2010-03-10 10:41 ` [patch 08/10 -mm v3] oom: avoid oom killer for lowmem allocations David Rientjes
2010-03-10 10:41 ` [patch 09/10 -mm v3] oom: remove unnecessary code and cleanup David Rientjes
2010-03-10 10:41 ` [patch 10/10 -mm v3] oom: default to killing current for pagefault ooms David Rientjes
2010-03-12 7:34 ` [patch 00/10 -mm v3] oom killer rewrite KAMEZAWA Hiroyuki
2010-03-17 1:00 ` David Rientjes
2010-03-12 7:46 ` KAMEZAWA Hiroyuki
2010-03-17 1:21 ` David Rientjes [this message]
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=alpine.DEB.2.00.1003161813340.14676@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
--cc=riel@redhat.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