You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Bjoern Metzdorf (JIRA)" <ji...@apache.org> on 2014/11/19 02:19:33 UTC

[jira] [Created] (MESOS-2128) Turning on cgroups_limit_swap effectively disables memory isolation

Bjoern Metzdorf created MESOS-2128:
--------------------------------------

             Summary: Turning on cgroups_limit_swap effectively disables memory isolation
                 Key: MESOS-2128
                 URL: https://issues.apache.org/jira/browse/MESOS-2128
             Project: Mesos
          Issue Type: Bug
          Components: isolation
         Environment: mesos-0.20.1 on 3.8.13-26.2.2.el6uek.x86_64

            Reporter: Bjoern Metzdorf


Our test runs show that enabling cgroups_limit_swap effectively disables memory isolation altogether.

Per: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-memory.html

"It is important to set the memory.limit_in_bytes parameter before setting the memory.memsw.limit_in_bytes parameter: attempting to do so in the reverse order results in an error. This is because memory.memsw.limit_in_bytes becomes available only after all memory limitations (previously set in memory.limit_in_bytes) are exhausted."

Looks like the flag sets "memory.memsw.limit_in_bytes" if true and "memory.limit_in_bytes" if false, but should always set "memory.limit_in_bytes" and in addition set "memory.memsw.limit_in_bytes" if true. Otherwise the limits won't be set and enforced.

See: https://github.com/apache/mesos/blob/c8598f7f5a24a01b6a68e0f060b79662ee97af89/src/slave/containerizer/isolators/cgroups/mem.cpp#L365




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)