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

What is the relation between CpuThreshold option and request/limit cpu resource k8s deployment config? #4265

Open
SgtDaJim opened this issue Jul 22, 2024 · 3 comments
Assignees

Comments

@SgtDaJim
Copy link
Contributor

I am using go-zero in a service deployed on k8s, and I set request / limit cpu 4 cores (4000m). I found that the range of CpuThreshold is [0:1000), so I set 950. Under this config, I found my service cannot occupy all the cpu I request, and the rpc service will response service overloaded when cpu usage is near 1000m。
What can I do to make my service occupy all the resource I request?

@kevwan
Copy link
Contributor

kevwan commented Jul 22, 2024

950 means 95% of your cpu limit. And 95% is a moving average value, you can consider it as the average value of last 5 seconds.

@kevwan kevwan self-assigned this Jul 22, 2024
@SgtDaJim
Copy link
Contributor Author

SgtDaJim commented Jul 26, 2024

950 means 95% of your cpu limit. And 95% is a moving average value, you can consider it as the average value of last 5 seconds.

that is strange.
I review my config, I set resource like this:
image

then i got an error before (time is UTC):
image

but at that time, cpu monitoring looked like this:
image

it seems not touching the threshold.

@SgtDaJim
Copy link
Contributor Author

SgtDaJim commented Aug 2, 2024

Hi, any update?

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

2 participants