Benchmarking CPU performance helps you understand your VPS's actual computational capability, compare plans/providers objectively, and verify you're getting the performance your plan specifies.
Why CPU Benchmarking Matters
"vCPU" allocations can vary in actual performance between providers depending on the underlying physical hardware and virtualization overhead — benchmarking gives you concrete, comparable numbers rather than relying solely on core count.
Quick Single-Core Test with sysbench
sudo apt install sysbench -y
sysbench cpu --cpu-max-prime=20000 --threads=1 run
Measures single-threaded performance via prime number calculation — a simple, widely-used comparative benchmark.
Multi-Threaded Test
sysbench cpu --cpu-max-prime=20000 --threads=$(nproc) run
Tests using all available cores, useful for understanding actual multi-core scaling for your specific VPS.
Understanding the Output
Key metric: "events per second" — higher indicates better performance for this specific test type; compare across different VPS plans/providers using identical test parameters for meaningful comparison.
Memory Bandwidth Test (Related to Overall Performance)
sysbench memory --memory-block-size=1M --memory-total-size=10G run
Comparing Against Other Providers/Plans
Run identical benchmark parameters across different VPS instances (your current one, a trial instance elsewhere) for genuine apples-to-apples comparison — useful when evaluating whether to upgrade, or comparing providers before committing.
Real-World Application Benchmarking (More Relevant Than Synthetic Tests)
Synthetic CPU benchmarks are useful for comparison but don't always reflect your actual application's real-world performance — where possible, benchmark your actual application under realistic load (see How to Load Test Your Website Before a Traffic Spike) for the most directly relevant performance picture.
Checking for CPU Steal Time (Relevant on Shared/Virtualized Infrastructure)
top
The %st (steal) value indicates time your VM wanted to use CPU but the underlying hypervisor gave it to another tenant instead — consistently high steal time indicates genuine CPU contention on shared infrastructure, a meaningful finding distinct from your own workload's actual demand.
Understanding CPU Steal Time's Implications
If steal time is consistently elevated, your actual available performance is meaningfully less than the nominal vCPU allocation suggests — worth raising with your provider, or considering a plan with more dedicated/guaranteed resources if this is a persistent issue.
Documenting Baseline Performance
Run and record benchmark results when you first provision a VPS — useful as a baseline for comparison if you later suspect performance degradation, letting you distinguish "always been this way" from "recently changed."
Being Mindful of Benchmark Timing
Results can vary based on time of day/overall host load on shared infrastructure — run benchmarks at multiple different times for a more representative picture rather than relying on a single measurement.
Common Errors
Results significantly worse than expected for your plan tier — check CPU steal time first; if elevated, this points to infrastructure contention worth discussing with your provider rather than assuming your workload itself is the issue.
Continue Reading
- How to Benchmark VPS Disk I/O Performance (fio, dd)
- How to Load Test Your Website Before a Traffic Spike
- How to Choose the Right VPS Plan for Your Workload
Browse more articles in Performance & Monitoring.