MESOS-8418 for how this initially came up.
Currently, many of the cgroup helper functions perform an internal verify:
This reads /procs/mounts to see which cgroups subsystems are mounted, and /proc/mounts can get rather large and expensive to read.
The steady state case (polling /containers and /monitor/snapshot to retrieve container resource usage statistics) was addressed with a short term patch in
MESOS-8418. However, we should consider some longer-term fixes that address performance of other events that incur cgroup operations (e.g. updating resources of a container, launching a container, etc):
1. Consider moving the verify function to public and have the isolators use it where appropriate.
2. Complementary to 1, optimize verify (e.g. read /proc/self/mountstats as suggested in