On Fri, May 27, 2011 at 1:04 AM, Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> wrote:
* Ying Han <yinghan@xxxxxxxxxx> [2011-05-26 14:07:49]:
inf is a bit confusing for page faults -- no? Why not call it "rest"
> 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.
>
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.
Why not make this per memcg?
> 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.
>
That can be done.
Can't we use something like "-1" to mean reset?
> 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
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@xxxxxxxxx. 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="" href="mailto:dont@xxxxxxxxx">dont@xxxxxxxxx"> email@xxxxxxxxx </a>