Linux Internals

CPU Steal Time on a VPS: What It Means and How to Measure It

By NileVPS Team · Published · 5 min read

اقرأ المقال بالعربي

Your application feels slow, yet top shows plenty of idle CPU and no process hogging the processor. On a virtual server, one number often explains this puzzle: steal time. It is the share of time your virtual CPU was ready to run but the hypervisor was busy serving someone else. Understanding steal time helps you tell the difference between a problem inside your server and a limit of the host underneath it.

What steal time actually measures

A VPS runs on a hypervisor such as KVM. Each virtual CPU (vCPU) of your server is scheduled onto a physical CPU core by the host, much like a process is scheduled onto a core by Linux. When your vCPU has work to do but the host scheduler has given the physical core to another task, the guest kernel records that waiting period as steal.

Paravirtualized guests learn about this through a shared clock interface the hypervisor exposes, so the number is reported by the host itself, not guessed. Linux exposes it as the eighth value on each cpu line of /proc/stat, and every standard tool reads from there.

Important points:

  • Steal is only meaningful inside a virtual machine. On bare metal it is always zero.
  • Steal counts time when you *wanted* to run. An idle server shows near-zero steal even on a busy host, because it is not asking for CPU.
  • Steal is not a bug in your system. It is the visible effect of sharing physical CPU time.

How to see steal time

top and htop

In top, look at the %Cpu(s) line. The last field, st, is steal:

%Cpu(s): 12.0 us,  3.1 sy,  0.0 ni, 80.2 id,  0.4 wa,  0.0 hi,  0.1 si,  4.2 st

Press 1 to see each vCPU separately. In htop, enable "Detailed CPU time" under Setup > Display options and steal appears as its own colored segment.

vmstat

vmstat 2 10

The st column on the right shows steal every two seconds. Watching a series is far more useful than a single snapshot.

mpstat and sar

From the sysstat package:

sudo apt install sysstat        # Debian / Ubuntu
mpstat -P ALL 2 5               # per-vCPU, including %steal
sar -u 1 30                     # CPU usage with %steal

If sysstat collection is enabled, sar -u -f /var/log/sysstat/saXX (path varies by distribution) lets you review steal for earlier hours, which is ideal for catching problems that happen at night.

How to interpret the numbers

There is no universal threshold, but a practical reading looks like this:

Steal patternLikely meaningAction
Near 0% most of the timeHost has spare capacityNothing to do
Small, brief spikesNormal sharing on a busy hostMonitor only
Consistently noticeable while you are loadedYour vCPU regularly waits for the hostMeasure impact, consider dedicated vCPU
High and steady, latency suffersReal contention or a CPU quotaContact support, resize or move

Two things matter more than the raw percentage: whether steal is sustained, and whether it coincides with user-visible slowness such as rising response times. A batch job that takes a little longer may not care; a game server or trading bot with tight latency budgets will.

Also remember that some plans enforce a CPU quota on shared vCPUs. When you exceed your fair share for a long time, the throttled periods can show up as steal too.

Steal time vs other CPU states

It is easy to confuse steal with other "lost" time:

  • iowait (`wa`): the CPU was idle while waiting for disk I/O. That points to storage, not CPU sharing.
  • idle (`id`): nothing to run. High idle with slow requests often means a lock, a slow external API, or a single-threaded bottleneck.
  • system (`sy`): the kernel is busy on your behalf, for example with many small network packets or syscalls.
  • load average: counts runnable tasks, so high steal can raise load average even though your own code is not using more CPU. See our guide to load average.

What you can do about high steal

You cannot lower steal from inside the guest by tuning the kernel, because the cause sits on the host. What you can do:

  1. Confirm it with data. Collect sar or vmstat output over a day so you have timestamps and values, not just impressions.
  2. Reduce wasted CPU work. Enable caching, fix busy-wait loops and polling scripts, and lower log verbosity. Less CPU demand means less exposure to contention.
  3. Spread load over time. Move cron jobs, backups and report generation away from peak traffic.
  4. Choose the right plan type. Shared vCPU plans are cost-efficient for websites and development. Latency-sensitive workloads such as databases under constant load, game servers or real-time bots benefit from dedicated vCPU plans. Compare options on our pricing page.
  5. Ask your provider. Share your measurements with support. A provider can investigate the host or migrate your server.
  6. Use snapshots to move safely. A snapshot lets you redeploy the same server on a different plan or location without rebuilding it.

Quick checklist

  • Check st in top and vmstat 2 during a slow period.
  • Look per vCPU with mpstat -P ALL.
  • Enable sysstat for historical data.
  • Compare steal with response times, not in isolation.
  • Rule out iowait and application locks before blaming the host.

FAQ

Is any steal time a sign of a bad VPS?

No. Small and occasional steal is a normal part of sharing hardware. It becomes a concern only when it is sustained while your server is busy and it measurably hurts response times or job duration.

Can I reduce steal time with kernel settings?

Not directly. Steal is caused by host scheduling, so guest tuning does not remove it. You can reduce how much it affects you by using less CPU, scheduling heavy jobs off-peak, or moving to a dedicated vCPU plan.

Why does my server show high load but low CPU usage?

Load average counts tasks waiting to run, including those waiting because the vCPU was stolen or blocked on disk. Check the st and wa columns in vmstat to see which one is responsible.

Related guides