linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Paul Menage" <menage@google.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	CKRM-Tech <ckrm-tech@lists.sourceforge.net>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Linux Memory Management <linux-mm@kvack.org>,
	rohitseth@google.com, devel@openvz.org,
	Christoph Lameter <clameter@sgi.com>
Subject: Re: [ckrm-tech] [patch00/05]: Containers(V2)- Introduction
Date: Wed, 20 Sep 2006 10:23:54 -0700	[thread overview]
Message-ID: <6599ad830609201023y4efcc82fjda76df872fce907d@mail.google.com> (raw)
In-Reply-To: <451173B5.1000805@yahoo.com.au>

On 9/20/06, Nick Piggin <nickpiggin@yahoo.com.au> wrote:

> Yeah, I'm not sure about that. I don't think really complex schemes
> are needed... but again I might need more knowledge of their workloads
> and problems.
>

The basic need for separating files into containers distinct from the
tasks that are using them arises when you have several "jobs" all
working with the same large data set. (Possibly read-only data files,
or possibly one job is updating a dataset that's being used by other
jobs).
For automated job-tracking and scheduling, it's important to be able
to distinguish shared usage from individual usage (e.g. to be able to
answer questions "if I kill job X, how much memory do I get back?" and
"how do I recover 1G of memory on this machine")

As an example, assume two jobs each with 100M of anonymous memory both
mapping the same 1G file, for a total usage of 1.2G.

Any setup that doesn't let you distinguish shared and private usage
makes it hard to answer that kind of scheduling questions. E.g.:

- first user gets charged for the page -> first job reported as 1.1G,
and the second as 0.1G.

- page charges get shared between all users of the page -> two tasks
using 0.6G each.

- all users get charged for the page -> two tasks using 1.1G each.

But in fact killing either one of these jobs individually would only
free up 100M

By explicitly letting userspace see that there are two jobs each with
a private usage of 100M, and they're sharing a dataset of 1G, it's
possible to make more informed decisions.

The issue of telling the kernel exactly which files/directories need
to be accounted separately can be handled by userspace.

It could be done by per-page accounting, or by constraining particular
files to particular memory zones, or by just tracking/limiting the
number of pages from each address_space in the pagecache, but I think
that it's important that the kernel at least provide the primitive
support for this.

Paul

--
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:[~2006-09-20 17:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1158718568.29000.44.camel@galaxy.corp.google.com>
2006-09-20  5:39 ` Nick Piggin
2006-09-20 16:26   ` Christoph Lameter
2006-09-20 16:56     ` Nick Piggin
2006-09-20 17:08       ` Christoph Lameter
2006-09-20 17:19         ` Nick Piggin
2006-09-20 17:30           ` Christoph Lameter
2006-09-20 18:03             ` Nick Piggin
2006-09-20 17:40       ` Alan Cox
2006-09-20 16:27   ` Rohit Seth
     [not found]   ` <1158751720.8970.67.camel@twins>
     [not found]     ` <4511626B.9000106@yahoo.com.au>
     [not found]       ` <1158767787.3278.103.camel@taijtu>
2006-09-20 17:00         ` Nick Piggin
2006-09-20 17:23           ` Paul Menage [this message]
2006-09-20 17:36           ` Alan Cox
2006-09-20 17:30             ` Nick Piggin
2006-09-20 17:50           ` Rohit Seth
2006-09-20 17:52             ` Christoph Lameter
2006-09-20 18:06               ` Peter Zijlstra
2006-09-20 18:14                 ` Rohit Seth
2006-09-20 18:27                   ` Peter Zijlstra
2006-09-20 18:33                     ` [ckrm-tech] " Paul Menage
2006-09-20 18:38                     ` Rohit Seth
2006-09-20 19:48                 ` Paul Jackson
2006-09-20 19:48                 ` Christoph Lameter
2006-09-20 19:51                   ` [ckrm-tech] " Paul Menage
2006-09-20 18:37             ` Peter Zijlstra
2006-09-20 18:57               ` Rohit Seth

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=6599ad830609201023y4efcc82fjda76df872fce907d@mail.google.com \
    --to=menage@google.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=ckrm-tech@lists.sourceforge.net \
    --cc=clameter@sgi.com \
    --cc=devel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=rohitseth@google.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