You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Chi Zhang <ch...@gmail.com> on 2013/05/30 23:38:23 UTC

Review Request: Improve OOM isolation

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11548/
-----------------------------------------------------------

Review request for mesos, Benjamin Hindman, Vinod Kone, and Ben Mahler.


Description
-------

Use memory.use_hierarchy cgroups option to restrict OOM killer scope.


Diffs
-----

  src/slave/cgroups_isolator.cpp f12fd48 

Diff: https://reviews.apache.org/r/11548/diff/


Testing
-------


Thanks,

Chi Zhang


Re: Review Request: Improve OOM isolation

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11548/#review22266
-----------------------------------------------------------


Can you add more context to this? From reading the kernel documentation:

----------------------------------------------------------------
https://www.kernel.org/doc/Documentation/cgroups/memory.txt
6. Hierarchy support

The memory controller supports a deep hierarchy and hierarchical accounting.
The hierarchy is created by creating the appropriate cgroups in the
cgroup filesystem. Consider for example, the following cgroup filesystem
hierarchy

	       root
	     /  |   \
            /	|    \
	   a	b     c
		      | \
		      |  \
		      d   e

In the diagram above, with hierarchical accounting enabled, all memory
usage of e, is accounted to its ancestors up until the root (i.e, c and root),
that has memory.use_hierarchy enabled. If one of the ancestors goes over its
limit, the reclaim algorithm reclaims from the tasks in the ancestor and the
children of the ancestor.
----------------------------------------------------------------

It sounds like we'd have to ensure that the slave cgroup always has the total memory requirements of all executors (cgroups) running under it. We currently do not do this, so adding this as is will be problematic, no? Am I understanding this correctly?

- Ben Mahler


On May 30, 2013, 9:38 p.m., Chi Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11548/
> -----------------------------------------------------------
> 
> (Updated May 30, 2013, 9:38 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Vinod Kone, and Ben Mahler.
> 
> 
> Description
> -------
> 
> Use memory.use_hierarchy cgroups option to restrict OOM killer scope.
> 
> 
> Diffs
> -----
> 
>   src/slave/cgroups_isolator.cpp f12fd48 
> 
> Diff: https://reviews.apache.org/r/11548/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Chi Zhang
> 
>


Re: Review Request: Improve OOM isolation

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11548/#review21210
-----------------------------------------------------------



src/slave/cgroups_isolator.cpp
<https://reviews.apache.org/r/11548/#comment44066>

    Can you expand on this comment, explaining what it provides?



src/slave/cgroups_isolator.cpp
<https://reviews.apache.org/r/11548/#comment44064>

    can you format it as follows:
    
    write = cgroups::write(
        hierarchy, flags.cgroups_hierarchy, "memory.use_hierarchy", "1");


- Vinod Kone


On May 30, 2013, 9:38 p.m., Chi Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11548/
> -----------------------------------------------------------
> 
> (Updated May 30, 2013, 9:38 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Vinod Kone, and Ben Mahler.
> 
> 
> Description
> -------
> 
> Use memory.use_hierarchy cgroups option to restrict OOM killer scope.
> 
> 
> Diffs
> -----
> 
>   src/slave/cgroups_isolator.cpp f12fd48 
> 
> Diff: https://reviews.apache.org/r/11548/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Chi Zhang
> 
>