Verify that cgroups v2 is actively enforcing CPU limits on NodeManager
hosts.
After enabling cgroups v2, confirm that the kernel is correctly enforcing the CPU
limits you have configured. This procedure sets a known CPU limit and then inspects
the cgroups v2 control file on a NodeManager host to confirm that the limit is in
effect.
-
In Cloudera Manager, navigate to .
-
Search for Containers CPU Limit and set
Containers CPU Limit Percentage to
50.
-
Click Save Changes.
-
Restart the YARN service.
-
On a NodeManager host, run the following command:
cat /sys/fs/cgroup/YARN/hadoop-yarn/cpu.max
-
Verify that the output matches the expected enforced CPU limit:
500000 1000000
The first value (500000) is the enforced quota in
microseconds per period. The second value (1000000) is the
period length in microseconds. A quota of 500,000 out of a period of
1,000,000 corresponds to 50% CPU, confirming that the limit is active.
The cpu.max file confirms that cgroups v2 is enforcing the
configured CPU limit on the NodeManager host.