How do you detect CPU throttling hurting latency in Kubernetes?
IntermediateScenarioGrafana, Dashboards and Kubernetes Monitoring
Answer
Situation read → CFS quotas throttle containers even when average CPU looks low.
What I'd do →
- Compute the throttling ratio:
sum by (namespace, pod) (rate(container_cpu_cfs_throttled_periods_total{container!=""}[5m]))
/
sum by (namespace, pod) (rate(container_cpu_cfs_periods_total{container!=""}[5m]))
- Correlate with p99 latency of the service.
- Raise or remove CPU limits for latency-sensitive services (keep requests accurate).
- For multi-threaded runtimes, tune thread counts (
GOMAXPROCSvia automaxprocs, JVM-XX:ActiveProcessorCount).
Why → Throttling adds latency in 100 ms CFS periods; averages hide it.
Interview tip → Mention the debate on CPU limits and why many teams set requests only.
More on Grafana, Dashboards and Kubernetes Monitoring
Grafana has 900 dashboards and nobody can find anything. How do you clean it up?IntermediateHow do you manage Grafana dashboards as code?IntermediateDesign a service overview dashboard that an on-call engineer can read in 10 seconds.BeginnerYou need to show deploy events on every Grafana graph. How?BeginnerPods are being OOMKilled but the memory graph never reaches the limit. Why?IntermediateYou inherit a cluster with no monitoring. What do you install first?Beginner