News for hackers. Stuff that matters.
Re:For the Love of God, Stop Using CPU Limits on Kubernetes by candiddevmike on Tuesday July 02, 2024 @10:37AM (#40857130)
K8s works best (economically) when it can bin pack things. The only way it can bin pack things safely is by having user provided limits--its not smart enough to right size your app (out of the box at least). Not setting them means you're going to end up paying more or have resource contention/outages.

It's better to set the limits higher than you need than to not set them at all. Ideally this is easily done since you're profiling/load testing your app and you understand the appropriate sizing for it, right?

Re:For the Love of God, Stop Using CPU Limits on Kubernetes by sadops on Tuesday July 02, 2024 @11:15AM (#40857460)
Ha! Always end with a joke, I love it.
Re:For the Love of God, Stop Using CPU Limits on Kubernetes by jiehong on Tuesday July 02, 2024 @10:45AM (#40857210)
Unless your app can use all the cpu you assign it
Re:For the Love of God, Stop Using CPU Limits on Kubernetes by cassianoleal on Tuesday July 02, 2024 @01:02PM (#40858492)
The problem is that the Kubernetes CPU scheduler is... not great.

There are many instances where it will throttle CPU of a pod way before it even reaches the requested amount, let alone the limits. This is only true if you set limits. If you don't, it will always have the requested amount available, plus whatever can be spared that's not in use by other processes. It will throttle at most down to the requested amount, and in most cases not at all.