Linux Container Development
 help / color / mirror / Atom feed
* No limitation in physical memory in cgroups
@ 2009-05-20  5:52 anqin
       [not found] ` <d95d44a20905192252t6cce5169y730a37184075beb9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: anqin @ 2009-05-20  5:52 UTC (permalink / raw)
  To: Linux Containers

Hi all,

I would like to bind given physical memory to specific task group,
however it does not take effect in my experiments. Are there
something wrong in my experiments.

My experiment is done under the kernel 2.6.29.3 and I constructed
my task group by following commands:

a) In shell #1, prepare a bash :

# bash
# echo $$
2253

b) In shell #2, prepare the memory control via cgroupfs:

# mount -t cgroup cgroup /mnt/mycgrp
# cd /mn/mycgrp
# mkdir mycontainer
# echo 0 > mycontainer/cpuset.mems
# echo 0-1 > mycontainer/cpuset.cpus
# echo 2252 > mycontainer/tasks

# cat mycontainer/memory.usage_in_bytes
2875392
# echo 3000000 > mycontainer/memory.max_usage_in_bytes
# cat mycontainer/memory.max_usage_in_bytes
3002368


c) In Shell #1, run a memory consumer (in which, malloc() is called
to allocate memory and not free until program is existed) to allocate
500M memory:

# /tmp/memoy_consumer_program  500

In Shell #2, the used memory ascends from start point 2875392 when
program begins (from number presented in memory.usage_in_bytes),
but it return to start point when it touches the maximal boundary.

On the other hand, I also run the top to watch the memory hold by
memoy_consumer_program. In top, the memory (both virtual and rss
memory ) is always growing without any limitation.

Is this phenomenon the correct behaviors of memory cgroups?


Best Regards,

Anqin

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-05-22  9:25 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-20  5:52 No limitation in physical memory in cgroups anqin
     [not found] ` <d95d44a20905192252t6cce5169y730a37184075beb9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-20  6:30   ` Daisuke Nishimura
     [not found]     ` <20090520153055.fe753b89.nishimura-YQH0OdQVrdy45+QrQBaojngSJqDPrsil@public.gmane.org>
2009-05-20  6:54       ` anqin
2009-05-20  7:05   ` Li Zefan
     [not found]     ` <4A13ABC8.2000907-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-05-20 10:35       ` anqin
     [not found]         ` <d95d44a20905200335v6aabfc28qa3958e8404965775-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-20 23:58           ` KAMEZAWA Hiroyuki
     [not found]             ` <20090521085857.d4b82cba.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2009-05-21  6:47               ` anqin
     [not found]                 ` <d95d44a20905202347y177e9744k1a9817236a102b53-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-21  7:15                   ` KAMEZAWA Hiroyuki
     [not found]                     ` <20090521161556.2eca8fd0.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2009-05-21 11:56                       ` anqin
     [not found]                         ` <d95d44a20905210456q13b2334avecb0dc6ff0f0d26-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-21 15:18                           ` Balbir Singh
     [not found]                             ` <20090521151848.GQ4858-SINUvgVNF2CyUtPGxGje5AC/G2K4zDHf@public.gmane.org>
2009-05-22  2:31                               ` anqin
     [not found]                                 ` <d95d44a20905211931v3918b5d3p79d47225963c81f3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-22  2:56                                   ` KAMEZAWA Hiroyuki
     [not found]                                     ` <20090522115622.30cb514a.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2009-05-22  9:25                                       ` anqin
2009-05-20 13:59   ` Balbir Singh
     [not found]     ` <20090520135944.GL4858-SINUvgVNF2CyUtPGxGje5AC/G2K4zDHf@public.gmane.org>
2009-05-20 15:01       ` anqin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox