upgrade cadvisor to reduce crane-agent cpu usage
Closed this issue · 0 comments
xrmzju commented
Describe the bug
The current version of cAdvisor (v0.39.2) reads extra cgroup files even though we have specified that the only metrics we need are CpuUsageMetrics and ProcessSchedulerMetrics .This causes a lot of file reading, which consumes a lot of CPU. More details can be found in this issue.
Reproduce steps
- Run crane-agent on a node with more than 100 pods.
- Observe the CPU usage, which can be quite high.
- In our environment, running crane-agent on a node with 150 pods can consume up to 8 cores.
Expected behavior
We expect cAdvisor to only read the cgroup files that are necessary to collect the specified metrics, and not to read any extra files that are not needed.
Screenshots
Environment (please complete the following information):
- K8S Version: [e.g. 1.22]