CPU Steal Time: Diagnose and Fix High Steal in Linux

High CPU steal slowing your Linux VM? Diagnose it with mpstat, vmstat and /proc/stat, distinguish throttling, and fix VPS or Proxmox contention.

CPU steal time is time a virtual CPU loses while the hypervisor schedules other work instead of running it. Linux usually reports it as %steal in mpstat, st in vmstat, or st in top. Sustained steal can make a VPS or virtual machine slow even when its applications do not appear to use all the CPU.

Start with mpstat -P ALL 1 5 inside the affected Linux VM. If steal rises during the slowdown, collect per-vCPU measurements and application latency over the same interval. Then investigate the host's available capacity, placement and scheduling limits. If steal stays low, check process CPU, I/O and CPU quotas before blaming a noisy neighbor.

This guide covers Linux guests on shared VPS platforms and KVM/Proxmox. Commands are diagnostic unless an installation step is explicitly shown. You do not need to restart the VM to collect the evidence.

In this guide

What is CPU steal time?

A vCPU is a schedulable execution context, not necessarily a dedicated physical core. The guest can have work ready while the host runs something else. The guest's steal counter records this involuntary wait when the virtualization platform exposes the accounting. The mpstat manual defines the metric and its reporting options.

High steal is a reason to investigate host scheduling. It does not identify which neighboring VM is responsible, prove that a provider has oversold a server, or show which of your processes should be killed. Other VMs, host work, limits and placement constraints can require different remedies.

CPU steal is also different from:

SignalWhat it helps you investigate
User and system CPUWork executing in the guest's applications and kernel
I/O waitIdle CPU accounting associated with outstanding I/O; it is not a complete disk-latency measure
CPU stealGuest-reported loss of vCPU execution time to hypervisor scheduling
Cgroup throttlingA service or container reaching an enforced CPU bandwidth limit
Load averageRunnable tasks and tasks in uninterruptible sleep, rather than a CPU percentage

For the broader CPU-state diagnosis, see our CPU usage monitoring guide. For queue interpretation, see understanding Linux load average.

How to diagnose high CPU steal in Linux

1. Install the diagnostic tools if needed

mpstat and pidstat are supplied by sysstat. vmstat is supplied by the procps package family. On Debian or Ubuntu, install missing tools with:

sudo apt-get update
sudo apt-get install sysstat procps

On Fedora or RHEL-family systems:

sudo dnf install sysstat procps-ng

Package installation changes the system. If that is not appropriate during an incident, use existing tools or the /proc/stat method below. These commands do not require enabling historical sysstat collection.

2. Measure each vCPU, not only the average

LC_ALL=C mpstat -P ALL 1 5

This requests five one-second samples. Read %steal for each numbered CPU and the all row. Use intervals: running mpstat without an interval reports an average since boot, which can hide a recent incident.

Here is an illustrative extraction, not a benchmark or a measurement from a customer:

CPU      %steal
all        5.00
0         20.00
1          0.00
2          0.00
3          0.00

The four-vCPU average looks modest, but one vCPU is substantially affected. A latency-sensitive thread concentrated there could suffer more than the aggregate suggests. Inspect repeated samples alongside the application's response times; a single one-second spike is not a root-cause report.

3. Compare steal with the guest's queue and CPU work

LC_ALL=C vmstat -w 1 6
LC_ALL=C pidstat -u 1 5

In vmstat, look at st alongside us, sy, id, wa and the runnable-task column r. Discard the first CPU report, which represents time since boot; the next five reports cover the sampling intervals. This behavior is documented in the vmstat manual.

pidstat helps identify processes consuming CPU inside the guest. Its %wait, when available, describes a task waiting to run; it is not the VM's %steal. The pidstat manual describes these task-level fields.

The two commands above run sequentially. Use the parallel collection below when you need matching incident windows. If system CPU dominates while steal remains low, follow our high system CPU usage on Linux troubleshooting guide instead.

4. Decide whether the steal is materially high

There is no universal safe percentage for every workload. Compare the incident with the VM's normal baseline, the worst affected vCPU, the duration, and the service's latency or throughput target.

For example, treat a repeated increase from near-zero steal to several percent during latency spikes as an investigation trigger. This is a triage rule, not a vendor guarantee or a claim that 5% is always harmful. Conversely, a clean five-second sample does not exclude an intermittent scheduling problem.

Collect a one-minute CPU steal incident report

Run this Bash snippet inside the affected guest during the slowdown. It collects three reports concurrently, creates a private temporary directory, and records any collector failure. It does not change scheduling or generate a synthetic CPU load.

for tool in mpstat vmstat pidstat; do
    command -v "$tool" >/dev/null || {
        printf 'Missing tool: %s\n' "$tool" >&2
        exit 1
    }
done

umask 077
report_dir=$(mktemp -d "${TMPDIR:-/tmp}/cpu-steal.XXXXXX") || exit 1
{
    date -u '+started_utc=%Y-%m-%dT%H:%M:%SZ'
    uname -r
} > "$report_dir/context.txt"

LC_ALL=C mpstat -P ALL 1 60 > "$report_dir/mpstat.txt" 2>&1 &
mpstat_pid=$!
LC_ALL=C vmstat -w 1 61 > "$report_dir/vmstat.txt" 2>&1 &
vmstat_pid=$!
LC_ALL=C pidstat -u 1 60 > "$report_dir/pidstat.txt" 2>&1 &
pidstat_pid=$!

result=0
wait "$mpstat_pid" || result=1
wait "$vmstat_pid" || result=1
wait "$pidstat_pid" || result=1
date -u '+finished_utc=%Y-%m-%dT%H:%M:%SZ' >> "$report_dir/context.txt"
printf 'Reports: %s\nCollector failure: %s\n' "$report_dir" "$result"

The first vmstat CPU row still covers time since boot. Each collector's interval starts independently, so align their timestamps rather than assuming identical row boundaries.

Add the affected VM identifier, UTC incident window, request rate and latency/error measurements to your investigation. Process reports can expose usernames and command names: review them before attaching them to a provider ticket.

A useful ticket asks: “During this interval, guest CPU steal increased while request latency increased at comparable traffic. Can you inspect host CPU scheduling, any effective limits and placement, and advise whether moving the VM would address the cause?” Include a healthy comparison interval when possible.

Calculate CPU steal from /proc/stat

If sysstat is unavailable but Python 3 is installed, this read-only sampler reports the aggregate steal percentage over five seconds. Run it in the VM itself, not in a container whose /proc view may have different scope.

python3 - <<'PY'
from pathlib import Path
import time

def snapshot():
    lines = Path('/proc/stat').read_text().splitlines()
    fields = lines[0].split()
    if fields[0] != 'cpu' or len(fields) < 9:
        raise RuntimeError('CPU steal accounting is unavailable')
    counters = [int(value) for value in fields[1:9]]
    cpus = tuple(line.split()[0] for line in lines
                 if line.startswith('cpu') and line.split()[0] != 'cpu')
    boot = Path('/proc/sys/kernel/random/boot_id').read_text().strip()
    return counters, cpus, boot

before, cpus_before, boot_before = snapshot()
time.sleep(5)
after, cpus_after, boot_after = snapshot()
if cpus_before != cpus_after or boot_before != boot_after:
    raise SystemExit('CPU topology or boot changed; sample again')
delta = [new - old for old, new in zip(before, after)]
total = sum(delta)
if any(value < 0 for value in delta) or total <= 0:
    raise SystemExit('Unusable counter interval; sample again')
print(f'Aggregate CPU steal: {100.0 * delta[7] / total:.2f}%')
PY

The calculation is 100 × change in steal / change in total CPU time. It uses the first eight CPU counters only. guest and guest_nice are already included in user and nice; adding them again would inflate the denominator. Counter units cancel in the percentage, so the script does not assume 100 ticks per second. See the kernel's proc filesystem documentation and the proc_stat manual.

The script deliberately rejects decreasing counters instead of silently correcting them; Linux documents that I/O-wait accounting can decrease. A zero result means no steal was recorded in this interval. It does not prove that the hypervisor exposes every scheduling delay.

For scale, an illustrative 10% aggregate steal across four continuously online vCPUs for 60 seconds represents about 0.10 × 4 × 60 = 24 CPU-seconds of accounted steal. It does not imply that every request became exactly 10% slower.

CPU steal vs CPU throttling and cloud credits

Check service or container CPU quotas separately

An application can be CPU-limited even when the VM reports zero steal. On a host using cgroup v2, inspect the actual cgroup for the affected service or container. This example assumes you have confirmed the service path; replace myapp.service with that path.

cg=/sys/fs/cgroup/system.slice/myapp.service
cat "$cg/cpu.max"
cat "$cg/cpu.stat"
sleep 10
cat "$cg/cpu.stat"

In cpu.max, 200000 100000 permits an aggregate two CPUs' worth of execution time per period. It is a bandwidth ceiling, not a reservation of two physical cores. Rising nr_throttled or throttled_usec indicates throttling recorded for that cgroup. Inspect ancestor limits too: an unlimited child can still be constrained by its parent. Missing controller files or counters are not proof of unlimited capacity. These interfaces are defined in the cgroup v2 documentation.

Compare quota changes with application demand before adjusting them. Raising a limit without host capacity can move the bottleneck rather than remove it. A container on a VM can encounter both container throttling and guest CPU steal, so measure both layers.

Check burstable cloud instances in the provider console

On AWS burstable instances, inspect CPUCreditBalance, CPUCreditUsage and, where applicable, surplus-credit metrics. In Standard mode, exhausting credits can restrict CPU to the baseline. Unlimited mode behaves differently and can use surplus credits. Therefore, neither an empty credit balance nor a high steal reading alone establishes the other condition. Use the provider's CPU credit concepts and credit monitoring documentation.

Credit metrics have a different reporting interval from one-second Linux samples. Compare aligned time windows and confirm the instance's mode before deciding whether a different capacity model fits the workload.

How to fix high CPU steal

On a rented VPS or cloud VM

The guest cannot force its hypervisor to provide more physical CPU time. Choose a remedy based on the evidence:

FindingNext actionWhat to verify afterward
Repeated steal and degraded latency at similar trafficAsk the provider to inspect host contention, limits and placement; request migration if that addresses the findingPer-vCPU steal and service latency under comparable load
Your batch work overlaps latency-sensitive trafficReschedule or reduce that batch workload to relieve demand while investigating the hostInteractive performance and batch completion time
Service/container throttling rises while steal stays lowReview its quota and workload concurrency within the available capacityThrottling deltas and latency, not only VM CPU
Burstable capacity repeatedly reaches its baseline limitReview instance mode and sustained CPU requirements with the provider's capacity modelCredit behavior and sustained throughput
Shared capacity is repeatedly unsuitable for a critical workloadEvaluate a plan with an explicit CPU allocation or isolation guaranteeThe actual guarantee, price and measured workload performance

Do not use a reboot as proof of a fix: it may temporarily change demand without changing the underlying host condition. Likewise, adding vCPUs does not itself reserve more physical CPU capacity. Test the workload and the provider's allocation model before resizing.

Reducing your application's demand can improve its response time during an incident, but it does not establish that host scheduling contention has disappeared. Keep the original measurements for comparison.

On a Proxmox or KVM host you administer

Investigate the physical host and the guest over the same incident window. For a Proxmox VM, inspect the configuration before changing it:

# Run on the Proxmox host. Replace 101 with the affected VM ID.
qm config 101
LC_ALL=C mpstat -P ALL 1 10
LC_ALL=C vmstat -w 1 11

Check these settings in the VM configuration:

  • cores, sockets and any vcpus setting: allocated topology and active CPU configuration.
  • cpulimit: a CPU-time ceiling, separate from the number of vCPUs.
  • cpuunits: relative scheduling weight when workloads compete, not guaranteed dedicated capacity.
  • affinity: a restricted CPU set can concentrate contention while other host CPUs remain available.

The official Proxmox CPU resource-limit documentation explains these controls. Review limits against their intended purpose before changing them. Check other guests and host jobs; rebalance or migrate workloads when the measurements support it. Right-size vCPUs for the application's parallelism. Do not disable intentional limits globally or pin every VM as a generic fix.

Changing the guest CPU model to host is also not a substitute for available execution time. Any CPU-model change needs compatibility review, especially if the VM migrates between nodes.

Our Proxmox virtual-machine monitoring guide covers host/guest observation. The virtual server monitoring guide provides a wider checklist when storage, memory or networking may also be involved.

Verify the fix and monitor recurrence

Repeat the one-minute collection after the change, using a comparable request rate, workload and observation period. Record four outcomes:

  1. Aggregate and worst-vCPU steal, including how long elevated samples last.
  2. Application latency, errors and throughput against the service's target.
  3. Guest CPU work, runnable tasks and any relevant quota/credit counters.
  4. The exact change made, with UTC timestamps and host or placement changes if known.

A lower steal percentage during a quiet period is insufficient evidence. Conversely, eliminating steal while latency remains poor means another bottleneck still needs investigation. Our guide to a slow server with apparently idle CPU explains why an aggregate idle percentage can be misleading.

For ongoing context, Fivenines Linux server monitoring brings CPU, load, memory, disk I/O and process information into a shared timeline. Keep the per-vCPU steal samples alongside that history so you can distinguish a host scheduling incident from application demand. For virtualized infrastructure, use Fivenines Proxmox monitoring to add host and VM context to the investigation.

CPU steal time: frequently asked questions

What causes high CPU steal on a VPS?

The VM is recording involuntary vCPU wait at the hypervisor layer. Host contention is one possible cause; effective limits and placement constraints also deserve investigation. Guest measurements alone cannot identify another tenant or prove the provider's root cause.

Can I fix CPU steal from inside Linux?

You can collect evidence and reduce your workload's demand. Fixing the host's allocation or scheduling usually requires the provider or hypervisor administrator. Killing arbitrary guest processes is not a targeted repair for host contention.

Is CPU steal the same as I/O wait?

No. Steal concerns hypervisor scheduling; I/O wait is separate idle-time accounting associated with outstanding I/O. Neither percentage alone explains every source of application latency.

Does zero CPU steal mean the VM has enough CPU?

No. The application may hit a service/container quota, a burstable-instance limit or a saturated individual vCPU. Accounting support and sampling intervals also matter. Check the affected workload rather than treating zero steal as a complete health check.

Will adding vCPUs reduce CPU steal?

Not necessarily. More vCPUs can help an appropriately parallel workload when backing capacity is available, but they do not automatically provide dedicated host resources. Compare performance before and after any resize and inspect the provider's CPU allocation policy.

Read more