[lxc-users] Problem with memory.memsw.limit_in_bytes on Ubuntu 14.04.

Serge Hallyn serge.hallyn at ubuntu.com
Thu Feb 26 16:00:05 UTC 2015


Quoting Jäkel, Guido (G.Jaekel at dnb.de):
> Dear Anthony, Dear Fajar,
> 
> On may unit letters like 'G' while setting the values of the memory cgroup controller.
> 
> But note that  memsw  stands for  the sum of  memory and swap. Therefore, can't set  memory.memsw.limit_in_bytes   to a value *lower* than the actual value of  memory.limit_in_bytes. In the other hand, you can't set  memory.limit_in_bytes  to a value *greater* than the actual value of  memory.memsw.limit_in_bytes.
> 
> Because the default is "unlimited", you first have to lower the value for memory before you be able to lower the memsw value.
> 
> To my opinion this is no good interface design, but unfortunately that's the current state. Maybe we should send a patch upstream, to automatically rise  memsw if  mem  should be set to a value greater than memsw and by the other hand lower  mem, if  memsw should be set below mem.

Might be worth having lxc order the rules so that it'll always just work.


More information about the lxc-users mailing list