Management Guides Troubleshooting
Why Is My VPS Slow? A Step-by-Step Triage Guide
Find out in ten minutes whether a slow VPS is short of CPU, losing CPU to neighbours (steal), out of memory, waiting on disk, or slowed by the network or the application.
A slow VPS has one of five causes: the CPU is busy, the CPU is being taken by other customers on the same host, memory has run out, the disk is slow or full, or the problem is in the network or the application. Ten minutes with standard tools tells you which. This guide gives the order to check them in and what each result means.
Commands are given for Ubuntu 26.04/24.04 and Debian 13 (apt) and for AlmaLinux and Rocky Linux 9 and 10 (dnf). They are standard tools from each distribution; this guide is a reference and was not benchmarked on a test server.
Step 1: get the overview
uptime
nproc
uptime prints three load averages (1, 5 and 15 minutes). Compare them with the number of CPU cores from nproc. A load of 2 on a 2-core server means the cores are fully used; a load of 8 on the same server means work is queuing.
Load on Linux counts processes waiting for the disk as well as for the CPU, so a high load does not prove the CPU is the problem. The next command separates the two.
vmstat 1 5
Ignore the first line (it is an average since boot) and read the last columns of the others:
| Column | Meaning | Points to |
|---|---|---|
us, sy | CPU time used by programs and by the kernel | Step 2: your own workload |
st | Steal: time your VM wanted the CPU but the host gave it to someone else | Step 3: the provider |
wa | Time spent waiting for the disk | Step 5: storage |
si, so | Memory being swapped in and out | Step 4: memory |
id | Idle | If this is high, the server is not the bottleneck: go to step 6 |
Step 2: the CPU is busy with your own work
High us or sy means a process on your server is using the CPU.
top -o %CPU
ps aux --sort=-%cpu | head -15
Common causes on a web server:
- PHP or application workers at the top of the list: a traffic spike, a slow page, or bots. Check the access log for one address or one URL being hit repeatedly.
- The database: a slow query. Enable the slow query log and look at what runs during the slowdown.
- A scheduled job: backups, log rotation and malware scans compete with the site. Move them to quiet hours.
- A process you do not recognise using a full core around the clock, often with a random name or running from
/tmp: treat it as a possible cryptocurrency miner and investigate before killing it.
If the workload is legitimate and the CPU is saturated for hours every day, the server is too small for the job.
Step 3: CPU steal
Steal time above zero means the physical host is busy with other virtual machines. Your processes are ready to run and are being made to wait. Watch it for a minute or two:
vmstat 1 60
# or, with the sysstat package installed
mpstat 1 60
There is no official threshold. Hosting guides commonly treat a few percent as normal on shared CPU plans and sustained steal above roughly 10% as a reason to contact the provider. Short spikes matter less than a level that stays high.
You cannot fix steal from inside the VM. What you can do:
- Record it. Save the output of
vmstat 1 60at several times of day, with timestamps. - Open a ticket with those numbers and ask to be moved to another host node.
- If it keeps happening, move to a plan with dedicated CPU cores or to another provider.
Some budget plans also throttle a VM that uses its full CPU for a long time. That can appear as steal or simply as lower performance; the provider's fair-use policy will say.
Step 4: memory
free -h
Read the available column, not free. Linux uses spare memory as disk cache and gives it back when programs need it, so low "free" memory is normal. Low "available" memory is the warning sign.
If si and so in vmstat are constantly above zero, the server is swapping heavily and everything slows down. When memory runs out completely, the kernel kills a process, usually the largest one, which is often the database. Check whether that has happened:
sudo journalctl -k | grep -i "out of memory"
sudo dmesg -T | grep -i "killed process"
Find what is using the memory:
ps aux --sort=-%mem | head -15
Fixes, in order of effort:
- Lower the number of PHP-FPM or application workers so that their total fits in RAM. Many small servers are configured for more workers than they can hold.
- Reduce the database's buffer sizes to suit the server. Defaults and copied "tuning" settings are often meant for larger machines.
- Add a swap file of 1–2 GB as a safety margin. See how to create a Linux swap file.
- Move to a plan with more RAM.
Step 5: disk
First rule out a full disk, which makes servers behave strangely long before they stop:
df -h
df -i
If a filesystem is above 90% in either command, free space before looking further. df -i shows inodes: a server can refuse to write files with space still free when millions of small files (sessions, cache, mail) have used them all.
High wa with space available means the storage itself is slow or overloaded.
# sysstat package
iostat -x 1 5
# which process is writing (run as root)
sudo iotop -o
In iostat, a device that sits near 100% in the %util column while doing little work is a slow device. On a VPS the disk is shared, so, like steal, sustained slowness with no heavy writer on your side is a matter for the provider. If one of your own processes is the writer, the usual causes are a backup, a database without enough memory, or a log being written at debug level.
Step 6: the server is idle but the site is slow
If CPU, memory and disk all look healthy, measure where the time goes for one request:
curl -o /dev/null -s -w "dns %{time_namelookup}s connect %{time_connect}s tls %{time_appconnect}s first byte %{time_starttransfer}s total %{time_total}s\n" https://example.com/
| Slow part | Likely cause |
|---|---|
| dns | Slow DNS hosting, or a broken resolver on the machine you test from |
| connect | Distance or packet loss between the visitor and the data centre. Test with mtr from the visitor's side |
| first byte (after connect and tls) | The application: slow queries, no page cache, calls to an outside service that is slow |
| total much larger than first byte | Large responses or limited bandwidth |
Run the same command on the server itself against localhost. If it is fast locally and slow from outside, the network is the cause. If it is slow in both places, the application is.
One more server-side check: a resolver that times out makes every outgoing connection slow, including logins over SSH. resolvectl status or cat /etc/resolv.conf shows which DNS servers the VPS uses.
What to send your provider
A ticket that says "my VPS is slow" gets a generic reply. Include:
- The plan, the server's address and the time zone of your timestamps.
vmstat 1 60output from two or three different times showing thestorwacolumn.iostat -x 1 5output if the complaint is about disk.- A statement of what you ruled out: load from your own processes, memory, disk space.
- A specific request: migration to another node, or confirmation of whether the plan is throttled.
Quick reference
| Symptom | Check | Usual fix |
|---|---|---|
High us/sy | top, access log, slow query log | Fix the process, add caching, or upgrade |
High st | vmstat 1 60 over time | Ticket, new node, dedicated CPU |
| Swapping, processes killed | free -h, kernel log | Fewer workers, smaller buffers, swap, more RAM |
High wa | df -h, iostat, iotop | Free space, find the writer, ticket |
| Server idle, site slow | curl -w timing | DNS, network path or application |
For the wider routine that prevents most of these, see VPS Management: A Practical Guide. For more on the individual tools: vmstat and iostat and sar.
Frequently asked questions
What is a normal load average?
Anything up to the number of CPU cores means the server is keeping up. Consistently above that, work is waiting. Check vmstat to see whether it is waiting for CPU or for disk.
What is CPU steal on a VPS?
The share of time your virtual machine was ready to use the CPU and the host ran another customer's machine instead. It shows as st in vmstat and top.
Will adding swap make my VPS faster?
No. Swap prevents crashes when memory briefly runs out. A server that swaps all the time is slow, and needs less memory use or more RAM.
Why is my VPS slow only at certain hours?
Either your own scheduled jobs (check crontab -l and systemctl list-timers) or busy neighbours on the host, which shows as steal or disk wait at those hours.