From: Ying Han <yinghan@google.com>
To: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Minchan Kim <minchan.kim@gmail.com>,
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
Tejun Heo <tj@kernel.org>, Pavel Emelyanov <xemul@openvz.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Andrew Morton <akpm@linux-foundation.org>,
Li Zefan <lizf@cn.fujitsu.com>, Mel Gorman <mel@csn.ul.ie>,
Christoph Lameter <cl@linux.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Rik van Riel <riel@redhat.com>, Hugh Dickins <hughd@google.com>,
Michal Hocko <mhocko@suse.cz>,
Dave Hansen <dave@linux.vnet.ibm.com>,
Zhu Yanhai <zhu.yanhai@gmail.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH] memcg: add pgfault latency histograms
Date: Fri, 27 May 2011 09:27:25 -0700 [thread overview]
Message-ID: <BANLkTin4ccq5Q0HbwwUS3VBwk-czWEFxog@mail.gmail.com> (raw)
In-Reply-To: <20110527080417.GG3440@balbir.in.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2738 bytes --]
On Fri, May 27, 2011 at 1:04 AM, Balbir Singh <balbir@linux.vnet.ibm.com>wrote:
> * Ying Han <yinghan@google.com> [2011-05-26 14:07:49]:
>
> > This adds histogram to capture pagefault latencies on per-memcg basis. I
> used
> > this patch on the memcg background reclaim test, and figured there could
> be more
> > usecases to monitor/debug application performance.
> >
> > The histogram is composed 8 bucket in ns unit. The last one is infinite
> (inf)
> > which is everything beyond the last one. To be more flexible, the buckets
> can
> > be reset and also each bucket is configurable at runtime.
> >
>
> inf is a bit confusing for page faults -- no? Why not call it "rest"
> or something line "> 38400".
ok, i can change that to "rest".
> BTW, why was 600 used as base?
>
well, that is based some of my experiments. I am doing anon page allocation
and most of the page fault falls into the bucket of 580 ns - 600 ns. So I
just leave it as default.
However, the bucket is configurable and user can change it based on their
workload and platform.
>
> > memory.pgfault_histogram: exports the histogram on per-memcg basis and
> also can
> > be reset by echoing "reset". Meantime, all the buckets are writable by
> echoing
> > the range into the API. see the example below.
> >
> > /proc/sys/vm/pgfault_histogram: the global sysfs tunablecan be used to
> turn
> > on/off recording the histogram.
> >
>
> Why not make this per memcg?
>
That can be done.
>
> > Functional Test:
> > Create a memcg with 10g hard_limit, running dd & allocate 8g anon page.
> > Measure the anon page allocation latency.
> >
> > $ mkdir /dev/cgroup/memory/B
> > $ echo 10g >/dev/cgroup/memory/B/memory.limit_in_bytes
> > $ echo $$ >/dev/cgroup/memory/B/tasks
> > $ dd if=/dev/zero of=/export/hdc3/dd/tf0 bs=1024 count=20971520 &
> > $ allocate 8g anon pages
> >
> > $ echo 1 >/proc/sys/vm/pgfault_histogram
> >
> > $ cat /dev/cgroup/memory/B/memory.pgfault_histogram
> > pgfault latency histogram (ns):
> > < 600 2051273
> > < 1200 40859
> > < 2400 4004
> > < 4800 1605
> > < 9600 170
> > < 19200 82
> > < 38400 6
> > < inf 0
> >
> > $ echo reset >/dev/cgroup/memory/B/memory.pgfault_histogram
>
> Can't we use something like "-1" to mean reset?
>
sounds good to me.
Thank you for reviewing.
--Ying
>
> --
> Three Cheers,
> Balbir
>
> --
> 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/ .
> Fight unfair telecom internet charges in Canada: sign
> http://stopthemeter.ca/
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
>
[-- Attachment #2: Type: text/html, Size: 4447 bytes --]
prev parent reply other threads:[~2011-05-27 16:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-26 21:07 [PATCH] memcg: add pgfault latency histograms Ying Han
2011-05-27 0:05 ` KAMEZAWA Hiroyuki
2011-05-27 0:23 ` Ying Han
2011-05-27 0:31 ` KAMEZAWA Hiroyuki
2011-05-27 1:40 ` Ying Han
2011-05-27 2:11 ` KAMEZAWA Hiroyuki
2011-05-27 4:45 ` Ying Han
2011-05-27 5:41 ` Ying Han
2011-05-27 8:33 ` KAMEZAWA Hiroyuki
2011-05-27 18:46 ` Ying Han
2011-05-28 10:17 ` Ingo Molnar
2011-05-31 16:51 ` Ying Han
2011-05-27 8:04 ` Balbir Singh
2011-05-27 16:27 ` Ying Han [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=BANLkTin4ccq5Q0HbwwUS3VBwk-czWEFxog@mail.gmail.com \
--to=yinghan@google.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=cl@linux.com \
--cc=dave@linux.vnet.ibm.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=lizf@cn.fujitsu.com \
--cc=mel@csn.ul.ie \
--cc=mhocko@suse.cz \
--cc=minchan.kim@gmail.com \
--cc=nishimura@mxp.nes.nec.co.jp \
--cc=riel@redhat.com \
--cc=tj@kernel.org \
--cc=xemul@openvz.org \
--cc=zhu.yanhai@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;
as well as URLs for NNTP newsgroup(s).