Grafana Cloud

CPU throttling

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

In this example, the home page shows within the Firing Alerts section of the Kubernetes Overview page a list of Pods that exceed specific thresholds, including an alert for CPU throttling.

Troubleshooting path for CPU throttling
Troubleshooting path for CPU throttling

When you click a Pod in the list, the Pod detail page appears, showing:

  • Continuous bursting for both CPU and memory
  • A list of all containers within the Pod

From the list of containers, click a container in the list to display the container detail page. It shows:

  • 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.

Short-term action

For a short-term solution, you can 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, you can create another alert with a longer time frame to see if the state is going to continue. Copy the 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 spike, optimize the container to be more efficient. To learn more, refer to Strategies for assigning CPU requests and limits to containers.