All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Righi <righi.andrea@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: balbir@linux.vnet.ibm.com, menage@google.com,
	kamezawa.hiroyu@jp.fujitsu.com, dave@linux.vnet.ibm.com,
	chlunde@ping.uio.no, dpshah@google.com, eric.rannaud@gmail.com,
	fernando@oss.ntt.co.jp, agk@sourceware.org,
	m.innocenti@cineca.it, s-uchida@ap.jp.nec.com,
	ryov@valinux.co.jp, matt@bluehost.com, dradford@bluehost.com,
	containers@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, Michael Rubin <mrubin@google.com>
Subject: Re: [RFC] [PATCH -mm 0/2] memcg: per cgroup dirty_ratio
Date: Sat, 13 Sep 2008 01:04:35 +0200	[thread overview]
Message-ID: <48CAF583.8060406@gmail.com> (raw)
In-Reply-To: <20080912131816.e0cfac7a.akpm@linux-foundation.org>

Andrew Morton wrote:
> On Fri, 12 Sep 2008 17:09:50 +0200
> Andrea Righi <righi.andrea@gmail.com> wrote:
> 
>> The goal of the patch is to control how much dirty file pages a cgroup can have
>> at any given time (see also [1]).
>>
>> Dirty file and writeback pages are accounted for each cgroup using the memory
>> controller statistics. Moreover, the dirty_ratio parameter is added to the
>> memory controller. It contains, as a percentage of the cgroup memory, the
>> number of dirty pages at which the processes belonging to the cgroup which are
>> generating disk writes will start writing out dirty data.
>>
>> So, the behaviour is actually the same as the global dirty_ratio, except that
>> it works per cgroup.
>>
>> Interface:
>> - two new entries "writeback" and "filedirty" are added to the file
>>   memory.stat, to export to userspace respectively the number of pages under
>>   writeback and the number of dirty file pages in the cgroup
>>
>> - the new file memory.dirty_ratio is added in the cgroup filesystem to show/set
>>   the memcg dirty_ratio
> 
> Seems like a desirable objective.
> 
>> [ This patch is still experimental and I only did few quick tests. I'd like to
>> do run more detailed benchmarks and compare the results, I guess the overhead
>> introduced by this patch shouldn't be so small... and BTW I would prefer a
>> dirty limit in bytes, intead of using a percentage of memory. Bytes are hugely
>> more flexible IMHO, they allow to define more fine-grained limits and so this
>> would work better on large memory machines. ]
>>
>> [1] http://lkml.org/lkml/2008/9/9/245
> 
> I tend to duck experimental and rfc patches ;)
> 
> One thing to think about please: Michael Rubin is hitting problems with
> the existing /proc/sys/vm/dirty-ratio.  Its present granularity of 1%
> is just too coarse for really large machines, and as
> memory-size/disk-speed ratios continue to increase, this will just get
> worse.
> 
> So after thinking about it a bit I encouraged him to propose a patch
> which adds a new /proc/sys/vm/hires-dirty-ratio (for some value of
> "hires" ;)) which simply offers a higher-resolution interface to the
> same internal kernel machinery.
> 
> How does this affect you?  I don't think we should be adding new
> interfaces which have the old 1%-resolution problem.  Once we get this
> higher-resolution interface sorted out, your new interface should do it
> the same way.

Totally agree.

The hires-dirty-ratio interface seems much better. I'll follow the progresses
of this new interface, reusing the same way in my patch doesn't look too difficult,
in any case.

BTW why not use a simple dirty-ratio-in-bytes?

Thanks for commenting,
-Andrea

  reply	other threads:[~2008-09-12 23:04 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-12 15:09 [RFC] [PATCH -mm 0/2] memcg: per cgroup dirty_ratio Andrea Righi
     [not found] ` <1221232192-13553-1-git-send-email-righi.andrea-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-09-12 20:18   ` Andrew Morton
2008-09-12 20:18     ` Andrew Morton
2008-09-12 23:04     ` Andrea Righi [this message]
     [not found]       ` <48CAF583.8060406-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-09-12 23:10         ` Andrew Morton
2008-09-12 23:10           ` Andrew Morton
2008-09-22 22:26           ` Michael Rubin
     [not found]           ` <20080912161050.5b6b4065.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2008-09-22 22:26             ` Michael Rubin
     [not found]     ` <20080912131816.e0cfac7a.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2008-09-12 23:04       ` Andrea Righi
2008-09-22 23:41       ` Michael Rubin
2008-09-22 23:41     ` Michael Rubin
     [not found]       ` <532480950809221641y3471267esff82a14be8056586-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-23 12:50         ` Andrea Righi
2008-09-23 17:48         ` KOSAKI Motohiro
2008-10-07 11:04         ` Balbir Singh
2008-09-23 12:50       ` Andrea Righi
2008-09-23 17:48       ` KOSAKI Motohiro
2008-09-23 20:21         ` Michael Rubin
     [not found]           ` <532480950809231321g7be0dd09pe6a32426b361e676-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-24  6:59             ` KOSAKI Motohiro
2008-09-24  6:59           ` KOSAKI Motohiro
     [not found]         ` <20080924024437.DC21.KOSAKI.MOTOHIRO-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-09-23 20:21           ` Michael Rubin
2008-10-07 10:35           ` Andrea Righi
2008-10-07 10:35         ` Andrea Righi
2008-10-07 11:04       ` Balbir Singh
2008-10-07 15:49         ` Andrea Righi
2008-10-08  1:16           ` KAMEZAWA Hiroyuki
2008-10-08 13:13             ` Balbir Singh
2008-10-09 15:29               ` [PATCH -mm] page-writeback: fine-grained dirty_ratio and dirty_background_ratio Andrea Righi
2008-10-09 15:29                 ` Andrea Righi
2008-10-10  0:41                 ` KAMEZAWA Hiroyuki
2008-10-10  0:41                   ` KAMEZAWA Hiroyuki
2008-10-10  9:32                   ` Andrea Righi
2008-10-10  9:32                     ` Andrea Righi
2008-10-10 13:13                     ` Andrea Righi
2008-10-10 13:13                       ` Andrea Righi
2008-11-10 20:58                 ` [PATCH -mm] mm: fine-grained dirty_ratio_pcm and dirty_background_ratio_pcm (v2) Andrea Righi
2008-11-10 20:58                   ` Andrea Righi
     [not found]                   ` <4918A074.1050003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-11-10 21:12                     ` Andrew Morton
2008-11-10 21:12                       ` Andrew Morton
2008-11-10 21:12                       ` Andrew Morton
2008-11-10 22:03                       ` Andrea Righi
2008-11-10 22:03                         ` Andrea Righi
     [not found]                         ` <4918AFA1.4000102-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-11-10 22:12                           ` Andrew Morton
2008-11-10 22:12                             ` Andrew Morton
2008-11-10 22:12                             ` Andrew Morton
2008-11-10 22:15                           ` David Rientjes
2008-11-10 22:15                             ` David Rientjes
2008-11-10 22:15                             ` David Rientjes
     [not found]             ` <20081008101642.fcfb9186.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-10-08 13:13               ` [RFC] [PATCH -mm 0/2] memcg: per cgroup dirty_ratio Balbir Singh
     [not found]           ` <48EB851D.2030300-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-10-08  1:16             ` KAMEZAWA Hiroyuki
     [not found]         ` <48EB4236.1060100-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-10-07 15:49           ` Andrea Righi
  -- strict thread matches above, loose matches on Subject: below --
2008-09-12 15:09 Andrea Righi

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=48CAF583.8060406@gmail.com \
    --to=righi.andrea@gmail.com \
    --cc=agk@sourceware.org \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=chlunde@ping.uio.no \
    --cc=containers@lists.linux-foundation.org \
    --cc=dave@linux.vnet.ibm.com \
    --cc=dpshah@google.com \
    --cc=dradford@bluehost.com \
    --cc=eric.rannaud@gmail.com \
    --cc=fernando@oss.ntt.co.jp \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.innocenti@cineca.it \
    --cc=matt@bluehost.com \
    --cc=menage@google.com \
    --cc=mrubin@google.com \
    --cc=ryov@valinux.co.jp \
    --cc=s-uchida@ap.jp.nec.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.