Re: [PATCH V3] Add the pagefault count into memcg stats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 29, 2011 at 3:16 PM, Ying Han <yinghan@xxxxxxxxxx> wrote:
> Two new stats in per-memcg memory.stat which tracks the number of
> page faults and number of major page faults.
>
> "pgfault"
> "pgmajfault"
>
> They are different from "pgpgin"/"pgpgout" stat which count number of
> pages charged/discharged to the cgroup and have no meaning of reading/
> writing page to disk.
>
> It is valuable to track the two stats for both measuring application's
> performance as well as the efficiency of the kernel page reclaim path.
> Counting pagefaults per process is useful, but we also need the aggregated
> value since processes are monitored and controlled in cgroup basis in memcg.
>
> Functional test: check the total number of pgfault/pgmajfault of all
> memcgs and compare with global vmstat value:
>
> $ cat /proc/vmstat | grep fault
> pgfault 1070751
> pgmajfault 553
>
> $ cat /dev/cgroup/memory.stat | grep fault
> pgfault 1071138
> pgmajfault 553
> total_pgfault 1071142
> total_pgmajfault 553
>
> $ cat /dev/cgroup/A/memory.stat | grep fault
> pgfault 199
> pgmajfault 0
> total_pgfault 199
> total_pgmajfault 0
>
> Performance test: run page fault test(pft) wit 16 thread on faulting in 15G
> anon pages in 16G container. There is no regression noticed on the "flt/cpu/s"
>
> Sample output from pft:
> TAG pft:anon-sys-default:
> ÂGb ÂThr CLine  User   System   Wall  Âflt/cpu/s fault/wsec
> Â15  16  1   0.67s  233.41s  Â14.76s  16798.546 266356.260
>
> +-------------------------------------------------------------------------+
>  ÂN      Min      Max    ÂMedian      Avg    ÂStddev
> x Â10 Â Â 16682.962 Â Â 17344.027 Â Â 16913.524 Â Â 16928.812 Â Â Â166.5362
> + Â10 Â Â 16695.568 Â Â 16923.896 Â Â 16820.604 Â Â 16824.652 Â Â 84.816568
> No difference proven at 95.0% confidence
>
> Change V3..v2
> 1. removed the unnecessary function definition in memcontrol.h
>
> Signed-off-by: Ying Han <yinghan@xxxxxxxxxx>
Reviewed-by: Minchan Kim <minchan.kim@xxxxxxxxx>

-- 
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  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


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]