Menu

Your Kubernetes CPU limit may be slowing the app while the node sits idle
📰

Your Kubernetes CPU limit may be slowing the app while the node sits idle

DEV Community: kubernetes·Hritik Chaudhary·13 days ago
#iPGVPWHc
#devtokubernetes#devto#dev#container#limit
Long article (678 words) — no AI summary yet.
Reading 0:00
15s threshold

A pod can have p99 latency spikes, failing probes and slow requests while its CPU graph sits well under the limit and the node is mostly idle. The usual cause is CPU throttling, and it is easy to miss because the standard usage graph does not show it.

Here is what is going on and how to check your own cluster.

Requests and limits do different jobs

CPU request : used by the scheduler to place the pod, and as the container's relative share of CPU when the node is busy. It is a guarantee of weight, not a cap.

CPU limit : a hard cap, enforced with the Linux CFS quota. Even if the node has idle cores, the container is paused once it uses up its quota.

Memory is different. Memory cannot be paused, so a container that goes over its memory limit is OOM-killed. CPU is compressible, so the kernel makes the container wait instead.

How the quota actually works

The quota is handed out in short periods, 100 ms by default.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.