At Hostna, we maintain a fleet of KVM-based nodes in our Bad Salzuflen facility. When your automation workflows experience jitter or unexpected delays, the first metric to examine in the top output is the st column, which represents CPU steal time. This value indicates the amount of time a virtual CPU (vCPU) needed to run but was prevented from doing so by the hypervisor because the physical CPU resources were busy serving other instances.
| Symptom | Probable Cause | Recommended Fix |
|---|---|---|
High st in top |
Physical CPU overcommitment | Upgrade to vds-hosting |
| Erratic webhook response times | Hypervisor scheduling latency | Check pm.max_children |
| Clock drift or NTP errors | CPU cycle theft | Use kvm-clock source |
| Database query timeouts | I/O wait masked by steal | Tune innodb_buffer_pool_size |
The Mechanism of CPU Steal Time
In a virtualised environment, the physical processor is shared among multiple virtual machines. The hypervisor uses a scheduler, such as the Completely Fair Scheduler (CFS) in Linux, to allocate time slices to each guest. CPU steal time is the difference between the time the guest operating system wanted to run and the time it was actually given by the host. Unlike user or system time, which represent work being done, st represents work that is waiting to happen.
On our platform, we monitor these metrics to ensure that the ratio of virtual to physical cores remains within operational limits. However, if multiple guests on a single host node experience a simultaneous burst in demand—such as several instances performing heavy TLS 1.3 one-RTT handshakes or compiling software—the hypervisor must queue these requests. This queuing manifests as steal time in your top or vmstat reports.
How Steal Time Affects Automation Workflows
Automation tools like n8n or Node.js-based applications are particularly sensitive to CPU steal. Because these platforms often rely on a single-threaded event loop, even a micro-delay in CPU availability can cause the entire loop to stall. This results in increased workflow execution latency, where a task that normally takes 100 ms might suddenly take 500 ms or more. This jitter is often more damaging than a constant slow speed because it makes virtual private server options behave unpredictably.
When a workflow is triggered by a webhook, the initial response time—often measured as Time to First Byte (TTFB)—is directly impacted by how quickly the kernel can schedule the process. If the st value is consistently above 5%, you may observe that your automation triggers are not firing at the expected intervals. In a Linux environment, this contention can be diagnosed by looking at the process states in ps or top.
Diagnostic Commands for Measuring Contention
To determine if your performance issues are caused by steal time, you should run diagnostics during a period of high workload. The mpstat command is part of the sysstat package and provides a detailed breakdown of CPU usage per core. Run the following command to see a 5-second average across all cores:
mpstat -P ALL 1 5
Look specifically at the %gnice and %steal columns. If the %steal column shows values regularly exceeding 10%, the host is likely oversubscribed. Another useful tool is vmstat, which provides a broader view of system health. The last column, st, is where you will find the steal time metric. You can also monitor the r (runnable) and b (blocked) columns to see if processes are queuing for CPU or I/O.
A PHP-FPM pool with pm.max_children = 10 and a 512 MB memory_limit can claim 5 GB in the worst case, which is why a 4 GB machine that looks idle can still be killed by the OOM killer during one traffic spike — the ceiling is max_children x memory_limit, not average usage. When steal time is high, the OOM killer might trigger more frequently because the kernel cannot reclaim memory pages quickly enough when the CPU is busy elsewhere.
Impact on Database and Memory Operations
Database performance is another area where steal time creates significant bottlenecks. If your database configuration sets innodb_buffer_pool_size to roughly three quarters of the machine’s RAM, the system relies on the CPU to manage memory mapping and page faults. If steal time rises, these kernel-level operations experience latency that propagates up to the application layer, causing slow queries even when the NVMe IOPS versus throughput metrics look healthy.
The relationship between CPU availability and I/O is often overlooked. When a process issues an I/O request, it enters a wait state. Once the data is ready, the CPU must wake the process to handle the data. If the hypervisor denies the CPU at that exact moment, the process remains in iowait longer than necessary. This is why high steal time often correlates with high wa (iowait) values in top, even if the underlying storage is performing optimally at our German facility.
Mitigating the Effects of Noisy Neighbors
The term “noisy neighbor” refers to another virtual machine on the same host that is consuming an excessive amount of resources. While most modern hypervisors attempt to isolate guests using cgroup memory limits and fair scheduling, physical limits still apply. If your workload is mission-critical, you should consider dedicated CPU cores where the physical threads are pinned to your specific instance, eliminating steal time entirely.
For those on a shared vCPU plan, optimizing the application stack can help mitigate the impact of jitter. For example, ensuring that your technical documentation recommends using kvm-clock as the system clock source can prevent the system time from drifting during periods of high steal. Furthermore, lowering the pm.max_children in PHP-FPM or the worker count in your automation tool can reduce the number of context switches the CPU must perform, slightly easing the burden during contention.
Conclusion and Next Steps
CPU steal time is an inherent part of shared virtualisation, but it should not interfere with your daily operations. Monitoring the st metric is essential for anyone running time-sensitive automation or high-traffic databases. If you observe that your st values are consistently high and affecting your service level agreement targets, it is time to evaluate the resource allocation of the plan you are on.
When contacting our support team regarding performance issues, please include a 30-second snippet of top output and the results of mpstat -P ALL 1 10. This data allows us to determine if the issue is isolated to your instance or if there is a wider contention issue on the host node. Providing specific details about your innodb_buffer_pool_size and pm.max_children settings will also help us provide a more accurate diagnosis of the infrastructure at Hostna.
For further reading on how hypervisors manage these resources, you can consult the documentation on the Kernel-based Virtual Machine or review the official guides for scaling background tasks in automation environments.
This article was drafted with AI assistance from Hostna’s own research pipeline and published without individual review. Tell us if anything here is wrong.
