Re: Does warden container/daemon allow swap?

Matthew Sykes <matthew.sykes@...>

It doesn't mean that the process *can't* swap but it does mean that when
memory usage exceeds the limit, the kernel won't swap out any pages to
avoid the oom killer.

There were some discussions about this quite a while back and some folks
expressed concerns about it in relation to existing deployments and how to
get people to update the swap size because (if I recall correctly) of how
bosh manages it.

Might be a good idea to propose a change to garden to allow diego to
specify the memory+swap limit and figure out the right way forward.

On Sun, Nov 1, 2015 at 11:28 AM, Shaozhen Ding <dsz0111(a)> wrote:

I looked into the source code of warden.
Realized that warden sets these two cgroup memory settings

Both memory.limit_in_bytes and memory.memsw.limit_in_bytes are set to the
same value, which means the memory and memory + swap are the exact same
Does this mean the processes running in warden container can not swap at
all? Since before swap, the container will be killed by the OOM killer.
Wonder if this is a good strategy?

BTW, looking at docker. By default, it set memory.memsw.limit_in_bytes = 2
* memory.limit_in_bytes, which gives the application process some swap room.
Matthew Sykes

Join to automatically receive all group messages.