Live data from Hacker News

We should get rid of average CPU utilization

theocharis.dev

11–20 of 25 posts

Re: We should get rid of average CPU utilization

#16
No, not at all. Why get rid of a low-level statistical measure? It's not even quite clear what the article argues against. htop doesn't even show you "average CPU utilization", it provides a sample of the current CPU utilization.

To me the problem appears to be that they try to do some hard realtime computing with strict time guarantees, but are so far up the stack (golang library, golang scheduler, docker, kubernetes, virtualization, etc.), that they don't realize that this stack can't guarantee you realtime computing. CPU utilization is a very low-level measure and, in this stack, is only indirectly related to the observed timeouts.

Re: We should get rid of average CPU utilization

#17
I've learned the hard way that CPU resource limits in K8S are a bad idea, as can be seen in this post. Just use CPU requests without limits so the scheduler has an estimate of your applications CPU requirements, but it can burst to use more CPU when it's available.

With memory of course you should set a limit and from experience it should be the same as your memory requests.

Re: We should get rid of average CPU utilization

#18
post #8
post #5

TLDR; if app slow, give more resources

Or just don't put CPU limits: https://home.robusta.dev/blog/stop-using-cpu-limits

Yeah, that is mainly the point there. But difficult if company internal policies require it (for security, etc)

Re: We should get rid of average CPU utilization

#20
post #17

I've learned the hard way that CPU resource limits in K8S are a bad idea, as can be seen in this post. Just use CPU requests without limits so the scheduler has an estimate of your applications CPU requirements, but it can burst to use more CPU when it's available. With memory of course you should set a limit and from experience it should be the same as your memory requests.

There is also the concern that a single pod shouldn’t be able to take down an entire node. So there needs to be some safety levels. But then also not. I find this is a really complex issue which is not widely known (only in Kubernetes bubble)
Post reply on HN