CPU utilization

On this page 7

CPU utilization is the percentage of time a processor spends executing work rather than idling, measured over a defined sampling interval such as one second or one minute. It is one of the core server resources that monitoring tracks, because it shows how much processing headroom remains before requests start waiting for CPU time.

The figure is always an average over time and over cores. A value of 50% can mean every core is half busy or that half of the cores are fully saturated, so interpreting CPU utilization correctly requires knowing how it was sampled and aggregated.

How the operating system measures CPU utilization

The kernel does not measure utilization directly; it accumulates time counters for each core and each state. On Linux, these counters appear in /proc/stat in units of USER_HZ, usually 100 ticks per second, and tools such as top, vmstat, mpstat and monitoring agents compute utilization from the difference between two readings.

The resulting percentage is non-idle time divided by total time during the interval. Each state carries different diagnostic meaning, as the table shows.

StateMeaningWhat a high value suggests
userApplication code in user spaceBusy application logic or inefficient code
niceUser code with lowered priorityBackground batch jobs
systemKernel code on behalf of processesHeavy system calls, networking or context switching
iowaitIdle while disk I/O is outstandingStorage bottleneck rather than CPU shortage
irq and softirqHardware and deferred interrupt handlingHigh packet rates or interrupt imbalance
stealTime the hypervisor gave to other guestsOvercommitted virtualization host
idleNothing to runAvailable capacity
CPU time states reported by Linux

iowait is a form of idle time: the core could run other work if any were ready. A server with 40% iowait is waiting on storage, not short of processing power, which is why most tools calculate utilization as 100% minus idle minus iowait.

Calculating CPU utilization from counters

A worked calculation shows how the percentage is derived. Consider a virtual machine with 4 cores sampled over 1 second at 100 ticks per second, giving 400 ticks in total.

StateTicks in intervalShare of total
user18045.0%
system4010.0%
iowait205.0%
steal102.5%
idle15037.5%
Total400100.0%
Counter differences over a one-second interval on four cores

Utilization is 1 − (150 + 20) / 400, which equals 57.5%. Of that figure, 55 percentage points are real work by the guest and 2.5 points are steal, time the guest wanted but did not receive. Per-process tools report differently: in top, 100% means one full core, so a multithreaded process on this machine can show up to 400%.

Why high CPU utilization raises latency

Latency grows non-linearly as utilization approaches 100%, because new work increasingly arrives while the CPU is already busy and must queue. In the simple single-server queueing model, average response time equals service time divided by (1 − utilization).

UtilizationResponse time vs idle systemPractical meaning
50%2×Comfortable headroom
70%About 3.3×Common alert threshold for sustained load
80%5×Noticeable queuing at peaks
90%10×Latency spikes and timeouts likely
95%20×Saturation for interactive services
Response time multiplier in a single-server queue

Multi-core servers degrade somewhat more gracefully than this single-server model, but the shape holds. That is why capacity planners keep sustained utilization of latency-sensitive services below about 70%, while batch systems are deliberately run close to 100% to maximize throughput.

CPU utilization answers how busy the cores were, not how much work is waiting. Related metrics fill that gap, and reading them together prevents misdiagnosis.

MetricWhat it measuresKey difference
CPU utilizationShare of time cores were busyCapped at 100% per core
Load averageRunnable plus uninterruptible tasks, averagedShows queued demand and includes I/O waits on Linux
Run queue lengthTasks ready but waiting for a coreDirect sign of CPU contention
CPU pressure (PSI)Share of time tasks were stalled on CPUMeasures lost time, not busy time
cgroup throttlingPeriods in which a container hit its CPU quotaCan occur while the host has idle cores
Metrics often confused with CPU utilization

A server can show 60% CPU utilization with a load average far above its core count when many processes sit in uninterruptible disk waits. Conversely, a container limited to 0.5 CPU receives 50 ms per 100 ms period and is throttled at that point, even when the host is mostly idle.

Common pitfalls in reading CPU utilization

The number looks simple, but several effects make it misleading without context.

  • Averaging hides saturation: a single-threaded process pinning one core of 16 shows only about 6% total utilization.
  • Long intervals hide spikes: a five-minute average of 40% can contain bursts at 100% that cause timeouts.
  • SMT inflates headroom: with simultaneous multithreading, on a CPU with two hardware threads per core, 50% reported utilization can already mean the physical cores are nearly saturated.
  • Clock scaling skews comparisons: 50% at a reduced clock speed represents less work than 50% at full turbo frequency.
  • Steal is invisible per process: on shared virtual machines, rising steal slows the guest even though its own processes appear modest.

The simple explanation

CPU utilization tells you how busy the server’s brain is. Think of a cashier: if the cashier is serving customers 60% of the time and waiting 40% of the time, utilization is 60%.

As the cashier gets close to 100% busy, lines form quickly and every customer waits longer. That is why administrators want spare capacity, not a processor that is always full.

How it is used in practice

An operations team runs a web API on eight virtual machines with 4 cores each. Dashboards show average CPU utilization of 45%, yet users report slow responses every evening around 8 p.m.

Breaking the metric down per core and per state reveals two facts: steal time rises to 15% during the evening because the cloud host is busy, and one worker process pins a single core at 100% while processing image thumbnails. The total average hid both problems.

The team moves thumbnail work to a separate queue with parallel workers and switches to instances with dedicated cores. Evening utilization settles at about 55%, steal drops below 1% and the 95th percentile response time falls from 1.8 seconds to 300 milliseconds. The team also sets alerts on sustained utilization above 70% and on steal above 5%.