A node within a cluster is the location where tasks are run. The tasks are launched with help of a daemon which resides inside the node. This daemon, in the case of Mesos, is Mesos Slave, and in case of YARN, is NodeManagerNode Manager.
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:
...
Code Block | ||
---|---|---|
| ||
/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> |
Enabling cgroups for meso-slave
To enable cgroups for mesos-slave, start the slave with the following flag:
Code Block | ||
---|---|---|
| ||
--isolation=cgroups/cpu,cgroups/mem |
Enabling cgroups for YARN NodeManager
To enable cgroups for YARN NodeManager:
...