Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The cgroups Linux kernel feature allows aggregating/partitioning a set of tasks and their future children into hierarchical groups with respect to one or more subsystems. For example: When cgroups are enabled for the cpu subsystem, and a task is launched by Mesos Slave, it goes under the following hierarchy:```bash

Code Block
languagebash
/sys/fs/cgroup/cpu/mesos/<parent-task-id>

``` 

During the lifecycle of this task, if it launches one or more children, they get mounted under the parent task’s hierarchy and can be configured to only use as much resources as the parent task is allowed to:

Code Block

...

languagebash
/sys/fs/cgroup/cpu/mesos/<parent-mesos-id>/hadoop-yarn/<child-yarn-id-1>

...


/sys/fs/cgroup/cpu/mesos/<parent-mesos-id>/hadoop-yarn/<child-yarn-id-2>

 

 ```

![cgroups hierarchy]({{ site.baseurl }}/docs/img/cgroups.png)

### h2.Enabling cgroups for mesos-slave

...