lkml.org 
[lkml]   [2012]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: About cgroup memory limits
(2012/05/10 19:55), Andre Nathan wrote:

> Thanks a lot Kame.
>
> On Thu, 2012-05-10 at 18:47 +0900, KAMEZAWA Hiroyuki wrote:
>> From above, rss + mapped_file == resident.
>
> But if you check the numbers I get from memory.stat and the sum of the
> statm fields for all container processes, this doesn't hold.
>
> resident = 28741632
> rss = 8192000
> mapped_file = 3743744
>
> Am I missing something here?
>

Considering again...

file_mapped is accounted into the memcg where it's accounted as 'cache' to.

So, you can know 'mapped_file/caches ratio' but you can't know which cgroup
maps it.

> size resident share text lib data dt
> 897208320 28741632 20500480 1171456 0 170676224 0
>

resident - share = anon.

28741632 - 20500480 = 8241152 (anon) near value to rss.

About file_mapped, 3743744(mapped_file) * 100 /20500480(shared) = 18 %

18% of your app's file-mapping may be accounted into the memcg.

You may be able to different score if you do all test after drop-cache.
echo 3 > /proc/sys/vm/drop_caches
Thanks,
-Kame






\
 
 \ /
  Last update: 2012-05-11 03:01    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site