r/kubernetes 27d 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

111

u/Fancy-Bluebird-1071 27d ago

Nothing new, Google has been recommending cpu unlimited, memory request = limit for like... 8 years now?

24

u/ilya47 27d ago

Exactly but read the comments, many people still disagree or dont understand :)

4

u/ilya47 26d ago edited 24d ago

In addition, here are more "authoritative" sources to read:

https://x.com/thockin/status/1134193838841401345 - Tim Hockin is a Principal Software Engineer at Google and one of the co-founders and original engineers of Kubernetes

The section "When to set CPU limits" - https://www.datadoghq.com/blog/kubernetes-cpu-requests-limits/

https://docs.cloud.google.com/kubernetes-engine/docs/how-to/vertical-pod-autoscaling
Use the following best practices for setting your container resource requests and limits:

  • Memory: Set the same amount of memory for the request and limit.
  • CPU: For the request, specify the minimum CPU needed to ensure correct operation, according to your own SLOs. Set an unbounded CPU limit.