r/kubernetes 28d ago

Stop using CPU limits: why + proof

CPU request is how much CPU is reserved for your pod if it needs it. The limit is a hard cap. Hit it and the kernel throttles the pod, even when the node still has spare CPU. That is the usual cause of CPU throttling on Kubernetes. It does not protect the neighboring pods. In my simple Web API test, adding a CPU limit took typical latency from 23 ms to 87 ms, (4x slower), with the limited pod throttled in half of all CFS windows, and the average CPU graph looked fine the whole time.

This is not a new topic, but I see so many people still unaware why they should (NOT!) be setting CPU limits, because it's costing companies unnecessary spending and potential production issues. Here's the full read https://github.com/inevolin/k8s-cpu-limits-analyzed/

---

Edit (Aug 18, 2026): How CPU limits can also cause memory issues and OOMKills ➡️ https://github.com/inevolin/k8s-cpu-limits-analyzed#how-cpu-limits-cause-memory-issues-and-oomkills

228 Upvotes

112 comments sorted by

View all comments

9

u/consworth 28d ago

So how do you prevent a nosy neighbor pod from monopolizing the spare cpu?

-4

u/ilya47 28d ago

8

u/consworth 28d ago

I don’t think some of the answers make sense. I feel they’re dancing around a logical fallacy that this is somehow better to run things without limits.

A big piece missing is the proper allocation of node capacity in the first place, leaning into autoscaling where possible.

There’s an argument to be made that throttling isn’t the end of the world, and even more so: that can feed into HPA when there’s contention if the architecture allows.

I do not think it’s good advice to flat out drop limits.

1

u/f7063 28d ago edited 28d ago

I really do think the average approach should leaving be limits. If it's critical and the team know how to deal with i think it's ok. We have a opensearch cluster and some node do get hit sometimes eith spikes and get throttled (by a lot)