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

2010-12-16 Thread Daniel Lezcano
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





--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


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

2010-12-15 Thread Trent W. Buck
t...@cybersource.com.au (Trent W. Buck)
writes:

 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.

The explanation for this is obvious when I go back to the kernel docs:

  memory.limit_in_bytes   # set/show limit of memory usage
  memory.memsw.limit_in_bytes # set/show limit of memory+Swap usage

Since the latter number includes the former, it obviously cannot be
less.  Likewise, if the two values are equal, that should

 Also, is there a way to specify that a container cannot use ANY swap,
 i.e. the swap cap is 0?

...mean no paging out to swap is allowed.


--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users