Stop the CFS quota from strangling your low-latency workloads
By Saket Jain Published Linux/Unix
Stop the CFS quota from strangling your low-latency workloads
Technical Briefing | 9/24/2026
You set your CPU limits in Kubernetes, and you feel good about it. You’ve capped the resource usage, preventing a rogue microservice from eating the entire node. But then your p99 latencies start spiking, and the logs don’t show any obvious bottleneck. That is because the Linux CFS quota is doing exactly what it was designed to do: it’s throttling your threads when they hit the quota period, often mid-execution. It’s a silent killer that turns a perfectly fine application into a jittery mess.
The kernel is just doing its job
The CFS quota works by tracking your process CPU usage over a 100ms window by default. If your process uses its entire quota halfway through that window, the kernel stops it dead in its tracks until the next window begins. This is why you see massive spikes in wait time that aren’t tied to disk or network latency. Most people assume their app is slow, but the app is just sitting there in a suspended state waiting for the scheduler to allow it to run again. If your application relies on multi-threaded work, this constant on-off switching creates overhead that effectively hides itself from standard monitoring tools.
cat /sys/fs/cgroup/cpu/cpu.stat
- nr_periods: total number of quota intervals that have elapsed
- nr_throttled: count of how many times your process was paused
- throttled_time: the actual duration in nanoseconds spent waiting
When you have to choose between cost and sanity
If you are running performance-sensitive workloads, avoid strict CPU limits if you can. Often, just using requests for scheduling is enough to keep your cluster healthy without invoking the aggressive throttling logic of the CFS quota. If you absolutely must have limits, try increasing the period length via the cpu.cfs_period_us setting, though you will need a custom runtime or a specialized operator to tweak that at the pod level safely. Keep an eye on the throttled metrics; if that number is climbing while your overall CPU usage is well below your limit, your limits are likely doing more harm than good.
