Configure CPU scheduling and isolation
You can configure CPU scheduling on your cluster to allocate the best possible nodes having the required CPU resources for application containers.
- In Cloudera Manager, select the YARN service.
- Click the Configuration tab.
- Search for Resource Calculator Class.
- Select the org.apache.hadoop.yarn.util.resource.DominantResourceCalculator option.
- Search for yarn.nodemanager.resource.cpu-vcores and set the number of vcores to match the number of physical CPU cores on the NodeManager host by providing the number of physical cores.
Enable cgroups along with CPU scheduling. Cgroups is used as the isolation mechanism for CPU processes. With cgroups strict enforcement activated, each CPU process receives only the resources it requests. Without cgroups activated, the DRF scheduler attempts to balance the load, but unpredictable behavior may occur. For more information, see Enabling cgroups.