[Lxc-users] total RAM limit

Gary Ballantyne gary.ballantyne at haulashore.com
Thu Jan 31 18:41:56 UTC 2013


On 01/02/13 02:33, lxc-users-request at lists.sourceforge.net wrote:
> On 2013-01-31 07:41, Gary Ballantyne wrote:
>> >*# echo '64M' > /sys/fs/cgroup/memory/lxc/memory.limit_in_bytes*
>> ># cat /sys/fs/cgroup/memory/lxc/memory.limit_in_bytes (return 67108864)
> Dear Gary,
>
> what's the value of '/sys/fs/cgroup/memory/lxc/'? If it's not '1', all cgroup settings in "lxc" will not be used as a template for the container "lxc/foo".
>
> It might be much simpler to add lxc config entries like 'lxc.cgroup.memory.limit_in_bytes = 64M' to your container configuration.
>
> And to limit use of swap, to my knowledge you also have to limit 'memory.memsw...'. But i may be wrong, on my LXC environmet i don't use swap at all.
>
>
> greetings
>
> Guido
Thanks Guido

Did you mean the value of 
/sys/fs/cgroup/memory/lxc/cgroup.clone_children? That guy is '1'.

Modifying the container configuration certainly works --- but I'd like 
to limit the total RAM available to all containers, rather than limit 
each individual container. I tried setting 
lxc.cgroup.memory.limit_in_bytes to various values (-1, 1G) to see if 
the container would pick up 
/sys/fs/cgroup/memory/lxc/memory.limit_in_bytes --- but no luck.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130201/ff2bd523/attachment.html>


More information about the lxc-users mailing list