For the Love of God, Stop Using CPU Limits on Kubernetes

  • I used to be on the same page as the author. But then I saw tons of application teams not setting CPU limits, and coming to rely on the bursting (in other words, their requests were too low). Thus when the system came under load their application started slowing in unexpected ways.

    We've had success with CPU limits, and horizontal scaling.

  • It's sad to me that Kubernetes doesn't expose the excellent hierarchical system for rationing CPU that's built into the kernel: cgroups. It has its own separate constraint system, makes its own scheduler. And it just seems not as good, not as flexible, as the hierarchical system cgroups offers.

    Being able to make a cgroup where essential services as a whole share a pool guaranteed 30%, then further refining & trading off that pool & other work pools feels like such a superpower. Compared to having to manage all services in flat, absolute terms.

  • I’d say being able to set I/O limits can be much more useful than CPU limits regardless of platform. Less chance of bringing an entire host to a halt.

  • Can't your operating system manage your CPU resources for you already? Why does Kubernetes need to be involved in process scheduling?

  • Almost 2-yo post and still as wrong as it was when it was posted.