Bali, Indonesia
Insights

Reading vmstat to Confirm If High CPU Steal Is Slowing Your VPS

October 19, 2026
0:00
You open a shell on your VPS during a period of sluggish performance, expecting to find an application runaway, but your usual tools show low resource usage. Web requests take several seconds to complete, terminal keystrokes hesitate, and background jobs drag on, yet inside the guest operating system, PHP, MySQL, and Nginx are barely consuming twenty percent of your allocated processor cores. When your internal operating system metrics appear healthy while overall execution crawls, the bottleneck frequently exists outside your virtual machine at the hypervisor scheduling layer. Virtual machines share physical Central Processing Unit (CPU) cores on host nodes managed by a hypervisor like KVM, Proxmox, or Xen. CPU steal—often abbreviated as steal time or st—measures the percentage of time a virtual machine wants to run tasks on a virtual CPU (vCPU) but must wait because the underlying hypervisor has allocated the physical processor core to another tenant or process. When multiple virtual instances contend for shared physical hardware, or when a hosting provider oversubscribes CPU cores beyond reasonable ratios, your guest operating system experiences involuntary latency. The standard utility vmstat (virtual memory statistics) is one of the most reliable and lightweight tools for confirming this behavior because it bypasses interactive display overhead and reports kernel scheduling states directly. If you suspect your hosting node is struggling with noisy neighbors, run through this prioritized diagnostic checklist to read vmstat accurately.
The first common mistake during troubleshooting is running vmstat without any arguments, which produces a single line representing cumulative averages since the virtual machine was last booted. That summary line hides real-time spikes and dilutes current resource starvation over days or months of historical uptime. Always specify an interval in seconds and a count of iterations. Running vmstat 1 5 instructs the utility to sample system counters every second and print five consecutive lines. The first line of output will still reflect the all-time boot average, but every subsequent line reflects the exact delta during that specific one-second sampling window. This gives you an accurate snapshot of how the guest kernel is behaving under current load.
TEXT
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 1  0      0 512400  32100 842100    0    0     4    12  210  450  8  2 89  1  0
 4  0      0 511900  32100 842100    0    0     0     0 1200 2400 12  4 34  0 50
 5  0      0 511800  32100 842100    0    0     0     0 1450 2800 15  5 22  0 58
 3  0      0 511500  32100 842100    0    0     0     0 1100 2100 10  3 42  0 45
 2  0      0 511200  32100 842100    0    0     0     0  950 1900 14  4 36  0 46
(Sample output format showing significant hypervisor steal under the st column)
Look at the far right section labeled cpu, specifically the column marked st. This column represents the percentage of total CPU capacity that the hypervisor took away from your guest kernel while your operating system had runnable processes queued up. On a dedicated server or a completely non-contended hypervisor, this number stays at zero. Occasional blips between one and three percent are normal on multi-tenant infrastructure as the hypervisor schedules slices across physical threads. However, sustained values above ten to twenty percent directly degrade real-time performance. If your st column consistently reads forty, fifty, or higher while the idle (id) column hovers low, your server is losing roughly half of its computing capacity to hypervisor scheduling delays rather than your own workloads.
Next, look at the far left column under procs, designated as r. The r value represents the run queue: the number of processes currently executing or placed in a runnable state, waiting for a CPU slice from the operating system scheduler. A healthy system generally maintains an r value that stays at or below the number of virtual CPU cores assigned to your instance. If you have two vCPUs assigned, an r value hovering between one and two indicates your system handles its queue smoothly. If your r value climbs to four, eight, or twelve while user space (us) and system space (sy) CPU consumption remain modest, your operating system is unable to clear active processes off its queue because the physical processor cycles are withheld by the host node.
Sluggish performance often looks identical between hardware layer CPU contention and slow underlying storage. In both scenarios, web server processes stall, load averages climb, and network responses time out. Verify this distinction by checking the wa column, which tracks I/O wait, alongside the b column under procs, which tracks uninterruptible sleep processes waiting on disk or network transfers. If wa is near zero and b is zero, your delay is not caused by slow disk storage or paging. When you see elevated st alongside flat wa, the bottleneck is exclusively processor time on the physical host rather than local disk saturation. If you notice elevated memory swapping or I/O pressure instead, reviewing our checklist on how to spot memory pressure on a VPS before the OOM killer hits will help you trace whether swapping is worsening the stall.
The sum of us (user code), sy (kernel code), id (idle), wa (waiting for I/O), and st (steal) should equal approximately one hundred percent. The relationship between id and st tells you how severely hypervisor contention affects your site traffic. If your user space usage is fifteen percent, system usage is five percent, and idle time is thirty percent while steal time takes up the remaining fifty percent, your applications cannot tap into what your guest kernel perceives as free capacity. When user requests arrive, the guest OS attempts to allocate cycles from the idle pool, but the hypervisor denies immediate execution because the physical host processor is busy running instructions for other virtual machines on the same socket.
Hypervisor contention is rarely steady throughout the day; it fluctuates as neighboring virtual machines run their own daily operations. Transient spikes during scheduled backup windows or cron execution are common on budget hosting, but ongoing contention indicates structural overcommitment. Run periodic vmstat samples into a timestamped text log every fifteen minutes using a cron job. If you observe that CPU steal spikes consistently during business hours and subsides late at night, you are sharing the physical host with high-traffic tenants on an oversubscribed node. Understanding these patterns is essential when evaluating production VPS providers and hypervisor benchmarks, as it separates temporary burst usage from aggressive over-allocation.
When escalating performance issues to a hosting provider, opening a ticket that simply says the server feels slow usually leads to tier-one support running basic checks, seeing low user CPU usage inside your guest, and concluding the issue lies within your web application or database configuration. Collect multi-line output samples from vmstat taken across multiple intervals during an active slowdown. Present the concrete relationship: show that your internal run queue is backed up, user and system times are low, disk wait is negligible, and steal time is consistently elevated. Providing quantitative, raw data from vmstat immediately shifts the investigation to the host node level, prompting tier-two and tier-three support engineers to inspect hypervisor core allocations, check noisy neighbor CPU usage, or migrate your VPS instance to an underutilized physical hypervisor node. Diagnosing sluggish servers starts with ruling out internal application bottlenecks, but when the numbers inside your operating system do not match the sluggish reality on the screen, hypervisor CPU steal is usually the hidden factor. Keeping vmstat in your immediate diagnostic toolkit lets you confirm host-level contention in seconds, giving you the facts you need to address the problem with your provider.