Using cgroup better ensure cpu allocation on container running on the cluster as it ensure that the minimum of share is provided to the container.
It can also be set to be strict but I would let container be able to get more cpu if no other container is competing for the resources.
Also it ensure that containers won't use all the available cpu thanks to yarn.nodemanager.resource.percentage-physical-cpu-limit config so we can ensure a percent of cpu is always available for system, puppet, checks...
https://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-site/NodeManagerCgroups.html