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

anqin anqin.qin at gmail.com
Thu May 21 04:56:56 PDT 2009


> right. memcg doesn't prevent malloc or mmap. but controls usage of "physical"
> memory.
>

ok.

> You need to call memset() or some to use "physical" memory by page fault.
> malloc just allocates virtual address. (and this program will start to use
> swap.)
>
>
> BTW, Try
> # echo 300M > .../memory.memsw.limit_in_bytes
> If you config CGROUP_MEM_RES_CTRL_SWAP. You can limit mem+swap usage.
>

hmm...  is the functionality  one of those in kernel 2.6.29.3?
I have compiled the kernel after marked with all cgroup-related
options, including the

[*] Resource counters
[*]   Memory Resource Controller for Control Cgroups
   [*]   Memory Resource Controller Swap Extension (EXPERIMENTAL)

but I can not find the memory.memsw.limit_in_bytes exists in cgroupfs.
It seems the only file related to swap is memory.swappiness.

I grep the created .config file and find the

CGROUP_MEM_RES_CTRL_SWAP=y

I have searched the Document/cgroups but found nothing.
Any idea?


Thanks again,

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