Re: No limitation in physical memory in cgroups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux