Interview Prep/Kubernetes/Resources, autoscaling and scheduling

CPU limits cause latency spikes though average usage is low. Why and what is the fix?

IntermediateScenarioResources, autoscaling and scheduling
Answer

Situation read → p99 latency is bad while CPU usage graphs look fine.

What I'd do →

  1. Check container_cpu_cfs_throttled_periods_total in Prometheus
  2. CFS quota throttles in 100ms periods, so bursts hit the limit even at low average
  3. Remove or raise CPU limits and keep accurate requests
  4. Keep memory limits
  5. Re-measure p99 after the change

Why → Throttling is per period, not per average, so spiky services are hurt.

Interview tip → Say many teams run CPU requests without limits.

All Kubernetes questions Roadmap: Kubernetes core

More on Resources, autoscaling and scheduling