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

container_spec_cpu_shares error margin #3599

Open
Homulvas opened this issue Sep 25, 2024 · 0 comments
Open

container_spec_cpu_shares error margin #3599

Homulvas opened this issue Sep 25, 2024 · 0 comments

Comments

@Homulvas
Copy link

Homulvas commented Sep 25, 2024

While investigating some CPU pressure issues I looked into how container_spec_cpu_shares metric is calculated. The formula is 2 + ((weight-1)*262142)/9999 from https://github.com/google/cadvisor/blob/master/container/common/helpers.go#L263. With a CPU weight of 1 this translates to 2. The next jump would be 2 to 28.

My question is this really an accurate representation of weights (or k8s requests) at the lower range of the spectrum? If a machine has many cores wouldn't the weight of 1 translate into a much higher value than 2 (assuming that we are splitting all of the cores 10000 ways)?

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

No branches or pull requests

1 participant