mesos-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: How to kill tasks when memory exceeds the cgroup limit?
Date Fri, 18 Mar 2016 20:58:17 GMT
Interesting, why does it take down the slaves?

Because a lot of organizations run with swap disabled (e.g. for more
deterministic performance), we originally did not set the swap limit at
all. When we introduced the '--cgroups_limit_swap' flag we had to make it
default to false initially in case any users were depending on the original
behavior of no swap limit. Now that it's been available for some time, we
can consider moving the default to true. This is actually reflected in the
TODO alongside the flag:

https://github.com/apache/mesos/blob/0.28.0/src/slave/flags.cpp#L331-L336

Want to send a patch? We'd need to communicate this change to the default
behavior in the CHANGELOG and specify how users can keep the original
behavior.

Also, there's more we would need to do in the long term for use cases that
desire swapping. The only support today is (1) no memory limits (2) memory
limit and no swap limit (3) both memory and swap limits. You can imagine
scenarios where users may want to control how much they're allowed to swap,
or maybe we want to swap for non-latency sensitive containers. However,
it's more complicated (the user and operator have to co-operate more, there
are more ways to run things, etc), and so the general advice is to disable
swap to keep things simple and deterministic.

On Fri, Mar 18, 2016 at 11:34 AM, Dick Davies <dick@hellooperator.net>
wrote:

> Great!
>
> I'm not really sure why mesos even allows RSS limiting without VMEM,
> it takes down slaves like the Black Death
> if you accidentally deploy a 'leaker'. I'm sure there's a use case I'm
> not seeing :)
>
> On 18 March 2016 at 16:27, Shiyao Ma <i@introo.me> wrote:
> > Thanks. The limit_swap works.
>

Mime
View raw message