[Lxc-users] RAM & swap caps - what isn't allowed?

Daniel Lezcano daniel.lezcano at free.fr
Thu Dec 16 13:53:50 UTC 2010


On 12/16/2010 02:39 AM, Trent W. Buck wrote:
> Some combinations of RAM and swap caps aren't allowed, and I'm having a
> hard time understanding the pattern (i.e. *why*).  From the examples
> below, I *think* I cannot assign a smaller swap cap than RAM cap.
>
> Also, is there a way to specify that a container cannot use ANY swap,
> i.e. the swap cap is 0?
>    

Yes, you have to specify memory and memswp with the same values.

The meaning of memory.memsw.limit_in_bytes is :

	memsw = memory_size + swap_size

Assuming:
	memory_size = 256MB
	memsw = 256MB

256 = 256 + swap_size =>  swap_size = 256 - 256 = 0MB
	







More information about the lxc-users mailing list