CPU Utilization Analysis
Places every workload in one of four levels by its CPU usage as a share of its CPU request, and ranks the workloads with the worst on top.
kubectl top shows 974m. It does not show that this is 195% of the CPU request
kubernetes.io, Assign CPU Resources to Containers and Pods, and Resource Management for Pods and Containers; cAdvisor Prometheus metrics docs; Datadog Container Report, 2023. The 974m and 500m come from the kubernetes.io example and are illustrative here.
kubectl top reports CPU in millicores. In the kubernetes.io example, a Pod with a CPU request of 500m uses 974m, which is 195% of its request. kubectl top prints 974m and leaves the division to you.
"CPU limits are enforced by CPU throttling" (kubernetes.io). The throttling counter, container_cpu_cfs_throttled_seconds_total, is in cAdvisor, not in kubectl top.
Over 65% of Kubernetes workloads use less than half of their requested CPU and memory (Datadog Container Report, 2023).
Levels by usage as a share of the request: Wave CPU Utilization docs. 974m of a 500m request: kubernetes.io example. The other workloads and values are illustrative.
How Wave does it
- cAdvisorreads container CPU, inside the kubelet
- usagemetrics-serverkeeps the latest value per Pod
- latestkubectl topprints millicores, with no request shown
- by handEngineercompares each value with its request
- Wave AgentCPU per container, with cAdvisor
- gRPCWave Coreusage as a share of the CPU request
- shareFour levelsNormal, Medium, High, Severe
- rankedWave Consoleworkloads ranked, worst on top
Compare with the request
Wave reads each workload's CPU usage as a share of its CPU request, not as raw millicores.
Sort into four levels
Normal below 40%, Medium 40% to 60%, High 60% to 80%, and Severe 80% or more. For each level, Wave shows how many times a workload entered it and how long it stayed, on average, within an hour.
Rank and group
The table puts the worst workloads on top. A Filter Group adds up the workloads that match its labels, such as a team, an environment, or a tier, into one row.