Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why runc always cost 40% cpu in k8s? #4624

Open
zdyj3170101136 opened this issue Feb 11, 2025 · 3 comments
Open

why runc always cost 40% cpu in k8s? #4624

zdyj3170101136 opened this issue Feb 11, 2025 · 3 comments

Comments

@zdyj3170101136
Copy link

I regularly collect the CPU consumption of all processes on the k8s machine through perf.

I found that the runc process usually consumes more than 40% of the CPU.

The following figure is a flame graph of the runc process on a k8s machine in the past minute。

it consist of 4000 different pid process of runc, cost 7.5 core.

Image

here is the raw pprof file, you could use go tool pprof -http=: to open it
pprof.pb.gz

@lifubang
Copy link
Member

Which runc version are you using, in your provided graph, I see intelrdt.getIntelRdtRoot, which has been removed from v1.1.0-rc.1.

@kolyshkin
Copy link
Contributor

The pprof shown is definitely of the old version of runc, which used to parse /proc/self/mountinfo a lot (mostly for cgroups, but in this case it's for intel_rtd).

Over the last few years we've implemented a number of optimizations, it would be interesting to see if upgrading to runc 1.2 changes the picture you are seeing.

@kolyshkin
Copy link
Contributor

@zdyj3170101136 are you going to keep participating in this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants