Enable Cgroups
You can enable CPU Scheduling to enable cgroups. You must configure certain properties
in yarn-site.xml
on the ResourceManager and NodeManager hosts to enable
cgroups.
cgroups is a Linux kernel feature. cgroups is supported on the following Linux operating systems:
-
CentOS 6.9, 7.3
-
RHEL 6.9, 7.3
-
SUSE 12
-
Ubuntu 16
At this time there is no cgroups equivalent for Windows. cgroups are not enabled by default on CDP. cgroups require that the CDP cluster be Kerberos enabled.
Enable cgroups
The following commands must be run on every reboot of the
NodeManager hosts to set up the cgroup hierarchy. Note that operating systems use
different mount points for the cgroup interface. Replace
/sys/fs/cgroup
with your operating system equivalent.
mkdir -p /sys/fs/cgroup/cpu/yarn chown -R yarn /sys/fs/cgroup/cpu/yarn mkdir -p /sys/fs/cgroup/memory/yarn chown -R yarn /sys/fs/cgroup/memory/yarn mkdir -p /sys/fs/cgroup/blkio/yarn chown -R yarn /sys/fs/cgroup/blkio/yarn mkdir -p /sys/fs/cgroup/net_cls/yarn chown -R yarn /sys/fs/cgroup/net_cls/yarn mkdir -p /sys/fs/cgroup/devices/yarn chown -R yarn /sys/fs/cgroup/devices/yarn