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

How to understand the calculation method of the kubernetes.io/batch-cpu value on a machine #2297

Open
KrWMdev opened this issue Dec 18, 2024 · 1 comment
Labels
kind/question Support request or question relating to Koordinator

Comments

@KrWMdev
Copy link

KrWMdev commented Dec 18, 2024

What happened:
How to understand the calculation method of the kubernetes.io/batch-cpu value on a machine, and what are the sources of factors that affect the changes in the kubernetes.io/batch-cpu value?
I tried to read the source code, but I didn't understand (for example, adding some deployments without actual load increases the allocated CPU requests on the machine, but the kubernetes.io/batch-cpu does not increase).
batchAllocatable := nodeAllocatable * thresholdPercent - podUsage(HP priority classes higher than Batch ) - systemUsage
https://github.com/koordinator-sh/koordinator/blob/main/pkg/slo-controller/noderesource/framework/README.md

Environment:

  • Koordinator version: - v1.4.1
  • Kubernetes version (use kubectl version): v1.28.2
  • docker version: cri-dockerd + docker 19.03.14
  • OS (e.g: cat /etc/os-release): rhel7.9
  • Kernel (e.g. uname -a): Linux 4.19.9-1.el7.elrepo.x86_64 ✨ Add NodeMetric API #1 SMP Thu Dec 13 10:52:03 EST 2018 x86_64 x86_64 x86_64 GNU/Linux

Anything else we need to know:

@KrWMdev KrWMdev added the kind/question Support request or question relating to Koordinator label Dec 18, 2024
@saintube
Copy link
Member

@KrWMdev Please refer to the Resource Model design doc: https://koordinator.sh/docs/architecture/resource-model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Support request or question relating to Koordinator
Projects
None yet
Development

No branches or pull requests

2 participants