Menu
Grafana Cloud

CPU throttling

CPU throttling occurs when CPU usage is near the CPU limit set for the container.

The following image shows a troubleshooting flow in Kubernetes Monitoring, starting at the Kubernetes Overview page in the Container Alerts section. When you click the container name next to the alert, the container detail page appears, showing:

  • The bursting pattern continuously above the CPU limit
  • The CPU throttling graph, which provides additional detail

This example shows both the requests and limits for CPU and memory have been outgrown since they were last set.

Troubleshooting path for CPU throttling
Troubleshooting path for CPU throttling

Short-term action

For a short-term solution, monitor whether this is a CPU usage spike or a longer term issue.

Mid-term action

To verify this is more than a temporary spike in CPU usage, create another alert with a longer time frame to see if the state is going to continue. To do so, copy the existing alert for CPU throttling and increase the time for the state. You can also narrow the alert to a specific namespace or workload.

Duplicated rule with time expanded to 10 minutes for throttling
Duplicated rule with time expanded to 10 minutes for throttling

Long-term action

If you learn the increase in usage is more than a temporary spike, optimize the container to be more efficient. To learn more, refer to Strategies for assigning CPU requests and limits to containers.