All of lore.kernel.org
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Andre Nathan <andre@digirati.com.br>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: About cgroup memory limits
Date: Fri, 11 May 2012 09:30:33 +0900	[thread overview]
Message-ID: <4FAC5DA9.90202@jp.fujitsu.com> (raw)
In-Reply-To: <1336647342.7710.5.camel@andre>

(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





  reply	other threads:[~2012-05-11  0:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09 18:37 About cgroup memory limits Andre Nathan
2012-05-10  9:47 ` KAMEZAWA Hiroyuki
2012-05-10 10:55   ` Andre Nathan
2012-05-11  0:30     ` KAMEZAWA Hiroyuki [this message]
2012-05-25  4:16   ` Zhu Yanhai
2012-05-25  4:58     ` Kamezawa Hiroyuki
2012-05-25  6:11       ` Zhu Yanhai
     [not found] ` <CAKTCnz=0vihGLXQx+C_9399018eJ1hfRHUk21fE=2i_emLzBAw@mail.gmail.com>
2012-05-15 11:07   ` Balbir Singh
  -- strict thread matches above, loose matches on Subject: below --
2012-05-10 21:38 Andre Nathan
2012-05-10 21:38 Andre Nathan
2012-05-15  9:20 ` Johannes Weiner
     [not found]   ` <20120515092040.GF1406-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2012-05-16 13:15     ` Michel Machado
2012-05-23  8:07       ` Johannes Weiner

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=4FAC5DA9.90202@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=andre@digirati.com.br \
    --cc=linux-kernel@vger.kernel.org \
    /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.