Interview Prep/Monitoring & Observability/Grafana, Dashboards and Kubernetes Monitoring

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 →

  1. 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]))
  1. Correlate with p99 latency of the service.
  2. Raise or remove CPU limits for latency-sensitive services (keep requests accurate).
  3. For multi-threaded runtimes, tune thread counts (GOMAXPROCS via 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.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Grafana, Dashboards and Kubernetes Monitoring