Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
See MESOS-8418 for how this initially came up.
Currently, many of the cgroup helper functions perform an internal verify:
https://github.com/apache/mesos/blob/1.6.0/src/linux/cgroups.cpp#L922
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 MESOS-8418).
Attachments
Issue Links
- is related to
-
MESOS-8418 mesos-agent high cpu usage because of numerous /proc/mounts reads
- Resolved