[Devel] Re: No limitation in physical memory in cgroups

anqin anqin.qin at gmail.com
Tue May 19 23:54:32 PDT 2009


>> 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
>>
> You need to write the limit to memory.limit_in_bytes.
> max_usage_in_bytes means the max of the usage so far(you can reset it
> by writing to it).
>

Sorry for missing the information in above statement. In above experiment,
the memory.limit_in_bytes has also been set to same quota as memory.
max_usage_in_bytes. In other words,

# cat mycontainer/memory.limit_in_bytes
3002368
# cat mycontainer/memory.max_usage_in_bytes
3002368


Under these setting, I got the result as mentioned in last email.

Any help?



Best,

Anqin
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list