linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: balbir@linux.vnet.ibm.com
Cc: Paul Menage <menage@google.com>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux kernel mailing list <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Hugh Dickins <hugh@veritas.com>,
	Lee Schermerhorn <Lee.Schermerhorn@hp.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Pavel Emelianov <xemul@sw.ru>,
	YAMAMOTO Takashi <yamamoto@valinux.co.jp>,
	Christoph Lameter <clameter@sgi.com>,
	"Martin J. Bligh" <mbligh@google.com>,
	Andy Whitcroft <andyw@uk.ibm.com>,
	Srivatsa Vaddagiri <vatsa@in.ibm.com>
Subject: Re: What can we do to get ready for memory controller merge in 2.6.25
Date: Sat, 1 Dec 2007 13:36:52 -0500	[thread overview]
Message-ID: <20071201133652.6888a717@bree.surriel.com> (raw)
In-Reply-To: <47512E65.9030803@linux.vnet.ibm.com>

On Sat, 01 Dec 2007 15:20:29 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:

> > In our experience, users are not good at figuring out how much memory
> > they really need. In general they tend to massively over-estimate
> > their requirements. So we want some way to determine how much of its
> > allocated memory a job is actively using, and how much could be thrown
> > away or swapped out without bothering the job too much.
> 
> One would prefer the kernel provides the mechanism and user space
> provides the policy. The algorithms to assign limits can exist in user
> space and be supported by a good set of statistics.

With the /proc/refaults info, we can measure how much extra
memory each process group needs, if any.

As for how much memory a process group needs, at pageout time
we can check the fraction of pages that are accessed.  If 60%
of the pages were recently accessed at pageout time and this
process group is spending little or no time waiting for refaults,
40% of the pages are *not* recently accessed and we can probably
reduce the amount of memory assigned to this group.

Page cache that has only been accessed once can also be
counted as "not recently accessed", since streaming file
IO should not increase the working set of the process group.

-- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

  reply	other threads:[~2007-12-01 18:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-29 14:43 What can we do to get ready for memory controller merge in 2.6.25 Balbir Singh
2007-11-29 15:47 ` Rik van Riel
2007-11-29 16:18   ` Balbir Singh
2007-11-30  2:11 ` Nick Piggin
2007-11-30  3:13   ` Balbir Singh
2007-11-30 10:11     ` KAMEZAWA Hiroyuki
2007-12-05 10:50       ` KAMEZAWA Hiroyuki
2007-12-01  7:39   ` Paul Menage
2007-12-01  9:50     ` Balbir Singh
2007-12-01 18:36       ` Rik van Riel [this message]
2007-12-01 19:02         ` Paul Menage
2007-12-01 19:26           ` Rik van Riel

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=20071201133652.6888a717@bree.surriel.com \
    --to=riel@redhat.com \
    --cc=Lee.Schermerhorn@hp.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=andyw@uk.ibm.com \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=clameter@sgi.com \
    --cc=hugh@veritas.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mbligh@google.com \
    --cc=menage@google.com \
    --cc=nickpiggin@yahoo.com.au \
    --cc=vatsa@in.ibm.com \
    --cc=xemul@sw.ru \
    --cc=yamamoto@valinux.co.jp \
    /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;
as well as URLs for NNTP newsgroup(s).