> ## Documentation Index
> Fetch the complete documentation index at: https://blog.onetsolutions.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Slow Linux VPS: find the CPU, RAM, disk or network bottleneck

> Slow Linux VPS? Find out in 10 minutes whether the bottleneck is CPU, RAM, disk or network, with vmstat, iostat, PSI and pidstat. An OnetSolutions guide.

*Published on November 23, 2026*

Your Linux VPS is slow: pages take ages to load, SSH lags, a backup never ends. Before you touch the configuration or change plans, find out which resource is holding things up. CPU, memory, disk and network each call for a different fix.

This guide follows the order of a diagnosis, on Debian, Ubuntu, AlmaLinux and Rocky Linux. Each section gives the symptom, the command that confirms it and what to do next. Ten minutes are enough to know where to look.

## Symptom, indicator, cause, action

Summary as of November 23, 2026:

| Symptom | Indicator | Likely cause | Action |
| - | - | - | - |
| Everything is slow, CPU at 100% | `vmstat`: `r` steadily above the vCPU count, high `us` or `sy` | One process, or more processes than vCPUs | Find the process (`pidstat -u`), optimise it, or add vCPUs |
| Slow while the CPU looks idle | High `wa`, non-zero `b`, processes in state `D` | The disk can't keep up | `iostat -x`, then `pidstat -d` to find who writes |
| Slowdowns in waves, busy disk | `vmstat`: `si` and `so` non-zero all the time | Not enough memory, the system is swapping | Shrink service memory, or add RAM |
| A service vanishes or restarts | `Out of memory: Killed process` in the kernel log | The OOM killer stopped the largest consumer | Cap the offending service, or add RAM |
| Busy CPU, no process to account for it | High `st` (steal) in `top` or `mpstat` | The vCPUs are waiting on the hypervisor | Record `mpstat` and contact support |
| Slow pages, idle server | Errors, drops or retransmissions in `ip -s link`, `nstat` | The network, or a remote dependency | `sar -n DEV`, `sar -n EDEV`, speed test |
| Writes fail | `df -h` at 100% | Full disk | See our [full disk guide](https://blog.onetsolutions.net/en/no-space-left-on-device-linux-vps.md) |

## Install the tools

`vmstat`, `free`, `top` and `ps` ship with the system. `mpstat`, `pidstat`, `iostat` and `sar` come from the `sysstat` package:

```bash theme={null}
# Debian, Ubuntu
sudo apt install sysstat

# AlmaLinux, Rocky Linux
sudo dnf install sysstat
```

Commands with an interval (`1 5` = one sample per second, five times) measure what is happening right now. Run them while the server is slow, not afterwards.

## Read the load average of a Linux VPS

**Symptom.** `uptime` shows a load that looks high.

```bash theme={null}
# Load average over 1, 5 and 15 minutes
uptime

# Number of vCPUs, for comparison
nproc
```

**What it really measures.** On Linux, the load average counts tasks ready to run (state `R`) **and** tasks waiting for disk I/O (state `D`), as the `proc_loadavg(5)` man page states. A high load does not necessarily mean a saturated CPU: a slow disk can cause it too.

Compare the load with the output of `nproc`. A load close to the vCPU count is normal under activity. If it is clearly above, move on to `vmstat` to see whether tasks are waiting for the CPU or for the disk.

The trend matters too: a 1-minute value far above the 15-minute one means a spike is starting.

## vmstat 1: the first triage

`vmstat` prints one line per second covering CPU, memory, swap and disks:

```bash theme={null}
# One line per second, ten times; -w widens the columns
vmstat -w 1 10
```

The first line is an average since boot: skip it. Read the next ones:

| Column | Meaning | Watch for |
| - | - | - |
| `r` | Runnable processes (running or waiting for the CPU) | Steadily above `nproc`: CPU saturated |
| `b` | Processes blocked waiting for I/O | Non-zero all the time: slow disk |
| `si` / `so` | Memory swapped in / swapped out per second | Non-zero all the time: not enough RAM |
| `us` / `sy` | User / kernel CPU time | High along with `r`: CPU load |
| `wa` | CPU time spent waiting for I/O | High: the disk is the bottleneck |
| `st` | Time stolen from the virtual machine by the hypervisor | High all the time: report it to support |

The rest of the guide follows each lead.

## Saturated CPU: which process is using it

**Symptom.** `r` exceeds the vCPU count, `us` or `sy` approach 100%.

**Confirm.** `mpstat` shows the load on each vCPU. One vCPU at 100% while the others sit idle points to an application that only works on one core:

```bash theme={null}
# Every vCPU, one sample per second, five times
mpstat -P ALL 1 5
```

**Find the process.** `pidstat -u` measures usage over the interval, which is more reliable than the snapshot `ps` gives:

```bash theme={null}
# CPU usage per process, one second, five times
pidstat -u 1 5

# The ten largest consumers since they started
ps -eo pid,user,%cpu,%mem,etime,comm --sort=-%cpu | head -n 11
```

The `%wait` column of `pidstat` shows how long a process waits for its turn on the CPU. High on several processes, it confirms there is more work than vCPUs.

In `top`, the `P` key sorts by CPU and `1` shows each vCPU separately.

**Act.** A scheduled job that lands at peak time can be moved. A heavy batch can be slowed with `nice` so interactive services keep the upper hand:

```bash theme={null}
# Start a job at the lowest priority
nice -n 19 /usr/local/bin/nightly-export

# Lower the priority of a running process (PID from pidstat)
sudo renice -n 19 -p 1234
```

If the load is legitimate and constant, you need more vCPUs.

## CPU steal: time taken by the hypervisor

**Symptom.** The CPU looks busy, yet no process accounts for the load.

**Confirm.** Look at the `st` column of `vmstat`, the `st` value on the `%Cpu(s)` line of `top`, or `%steal` in `mpstat -P ALL 1 5`. The `top` man page defines it as time "stolen from this vm by the hypervisor": your vCPUs were ready to work and had to wait.

**Act.** Record the output of `mpstat -P ALL 1 10` while it happens, with the time, and send it to [support](https://help.onetsolutions.net/console/support). Those figures let us analyse the situation precisely.

## Slow disk: iowait, iostat and state D

**Symptom.** The server crawls, the load rises, but the CPU is mostly idle. `vmstat` shows high `wa` and non-zero `b`.

**Confirm.** `iostat -x` gives detailed statistics for each disk:

```bash theme={null}
# Extended statistics, active disks only, without the since-boot average
iostat -dxz -y 1 5
```

| Column | Meaning |
| - | - |
| `r/s`, `w/s` | Reads and writes per second |
| `rkB/s`, `wkB/s` | Read and write throughput |
| `r_await`, `w_await` | Average time to serve a read, a write, in milliseconds, queueing included |
| `aqu-sz` | Average queue length |
| `%util` | Share of time the disk had requests in flight |

> [!NOTE]
>
> `%util` close to 100% means saturation on a disk that serves requests one at a time. The `iostat` man page is explicit: on an SSD or NVMe drive, which serves many in parallel, the figure does not reflect the real limit. Rely instead on `r_await`, `w_await` and `aqu-sz` rising together.

**Blocked processes.** A process in state `D` is waiting for I/O and cannot be interrupted. List them:

```bash theme={null}
# Processes in state D and the kernel function they are waiting in
ps -eo pid,stat,wchan:32,comm | awk 'NR == 1 || $2 ~ /^D/'
```

**Find who reads or writes.** `pidstat -d` attributes I/O to each process. Run it with `sudo` to see every user's processes:

```bash theme={null}
# kB_rd/s, kB_wr/s and iodelay per process
sudo pidstat -d 1 5
```

The `iodelay` column shows time spent waiting for the disk: that is the process that suffers, not always the one that causes it. The culprit is the one whose `kB_wr/s` or `kB_rd/s` dominates.

**Act.** The usual causes: a backup or `rsync` in the middle of the day, a database without indexes scanning whole tables, overly verbose logs, a swapping system (see the next section). A background job can step aside with `ionice`:

```bash theme={null}
# "idle" class: only uses the disk when nobody else needs it
sudo ionice -c 3 -p 1234
```

## Not enough RAM: free, swap and the OOM killer

### Read free -h

```bash theme={null}
free -h
```

Ignore the `free` column. Linux fills free memory with disk cache (`buff/cache`) and hands it back as soon as an application asks. The column that matters is `available`: according to the `free` man page, it estimates how much memory is available for starting new applications without swapping.

A low `available` value and a growing `used` swap figure mean you are really short of memory.

### Is the system swapping?

Used swap is not a problem in itself: the kernel parks unused pages there. The problem is constant back and forth:

```bash theme={null}
# si / so non-zero on every line: the system is actively swapping
vmstat -w 1 10

# Swap size and usage
swapon --show
```

### Who is using the memory

```bash theme={null}
# The ten processes holding the most physical memory (RSS in KiB)
ps -eo pid,user,rss,%mem,comm --sort=-rss | head -n 11

# Memory growth and major page faults per process
pidstat -r 1 5
```

In `pidstat -r`, a high `majflt/s` flags a process that keeps reading back from disk pages it no longer holds in memory.

`systemd-cgtop` groups usage by service, which helps when an application spawns dozens of processes (PHP-FPM, workers):

```bash theme={null}
# Services ordered by memory
systemd-cgtop -m
```

### Has the OOM killer struck?

When memory truly runs out, the kernel kills a process to save the system. It records it in its log:

```bash theme={null}
# Kernel messages since boot
sudo journalctl -k | grep -i -E "out of memory|oom-kill"

# Same without a persistent journal
sudo dmesg -T | grep -i -E "out of memory|oom-kill"
```

A line such as `Out of memory: Killed process 1234 (mariadbd)` names the process that was killed. A service that restarts on its own, or a database that "crashes" without an application error, often has this explanation.

**Act.** Shrink the memory of the growing service: MySQL or MariaDB buffer pool size, PHP-FPM `pm.max_children`, number of workers. To keep one service from taking the whole server down, systemd can give it a ceiling so everything else keeps running:

```bash theme={null}
# Memory ceiling for a service, applied live and persisted
sudo systemctl set-property php8.2-fpm.service MemoryMax=2G

# Check
systemctl show php8.2-fpm.service -p MemoryMax
```

Adjust the service name to your system. If memory is simply too tight for your applications, more RAM is the real answer.

## PSI pressure: CPU, memory and I/O at a glance

PSI (Pressure Stall Information) measures how long tasks were held up for lack of CPU, memory or I/O. It is the most direct answer to "what is slowing me down?". It has been available since kernel 4.20.

```bash theme={null}
# All three resources
grep . /proc/pressure/cpu /proc/pressure/memory /proc/pressure/io
```

Each file has two lines:

* `some`: share of time when **at least one** task was waiting for the resource;
* `full`: share of time when **all** active tasks were waiting at once. According to the kernel documentation, this line is undefined for the CPU at system level and reads zero there.

`avg10`, `avg60` and `avg300` are percentages over 10 seconds, 1 minute and 5 minutes; `total` accumulates stall time in microseconds. The resource with the highest `avg60` is your bottleneck. A memory `full` value that stays above zero means the system spends its time reclaiming memory.

With cgroup v2, each service has its own files. For MariaDB, for example:

```bash theme={null}
cat /sys/fs/cgroup/system.slice/mariadb.service/memory.pressure
cat /sys/fs/cgroup/system.slice/mariadb.service/io.pressure
```

> [!NOTE]
>
> If `/proc/pressure` does not exist, your kernel has PSI disabled by default. That is the case for kernels built with `CONFIG_PSI_DEFAULT_DISABLED`, such as the Red Hat family. Check, then enable it at the next boot with the `psi=1` parameter:
>
> ```bash theme={null}
> # y = PSI built in, but disabled by default
> grep CONFIG_PSI /boot/config-$(uname -r)
>
> # AlmaLinux, Rocky Linux: add psi=1 to every kernel, then reboot
> sudo grubby --update-kernel=ALL --args="psi=1"
> ```

## Slow network: throughput, errors, retransmissions

**Symptom.** The server is idle, but pages arrive slowly or transfers stall.

**Measure throughput.** `sar` shows live traffic per interface:

```bash theme={null}
# Packets and KiB received / sent per second, and %ifutil
sar -n DEV 1 5

# Errors and dropped packets per interface
sar -n EDEV 1 5
```

**Read the error counters.** Find the interface name first, then its counters:

```bash theme={null}
ip -br link
# RX / TX counters: errors, dropped (replace eth0)
ip -s link show dev eth0
```

**TCP retransmissions.** Retransmitted segments point to losses along the path. Listen queue overflows point to an application that does not accept connections fast enough:

```bash theme={null}
# Counters accumulated since boot
nstat -az TcpOutSegs TcpRetransSegs TcpExtListenOverflows TcpExtListenDrops

# Socket summary: established connections, TIME_WAIT
ss -s
```

Run `nstat` again a minute later and compare: the increase matters, not the total. A rising `TcpExtListenOverflows` points to the application (not enough workers), not to the network.

**Act.** Measure real throughput with a [speed test](https://help.onetsolutions.net/tutorials/how-to-do-a-speedtest). If the VPS answers fast but the application is slow, look at its remote dependencies: external API, database on another server, DNS resolution.

## Optimise, or move to a larger plan

The diagnosis ends with one of these answers:

| Situation | Action |
| - | - |
| A runaway process, a badly timed job, a poorly tuned service | Optimise: indexes, `nice`, `ionice`, `MemoryMax`, worker count |
| The load is legitimate and the bottleneck returns every day | Move to a plan with more vCPUs or RAM |
| The disk keeps filling up | Clean up with our [full disk guide](https://blog.onetsolutions.net/en/no-space-left-on-device-linux-vps.md), then a plan with more storage |
| The VPS no longer responds at all | Regain control through the [KVM console](https://help.onetsolutions.net/vps/kvm-console) or [rescue mode](https://help.onetsolutions.net/vps/rescue-mode) |

To change plans, open your VPS page in the [console](https://console.onetsolutions.net) and click **Change plan**: the console lists the eligible plans. Your data and system stay in place, with no reinstall. The ranges and their specifications are on the [VPS offers](https://help.onetsolutions.net/vps/offers) page, and our article on [64 GB RAM VPS plans](https://blog.onetsolutions.net/en/64gb-ram-vps-gp-64-p-64.md) walks through the upgrade step by step.

> [!TIP]
>
> Take a [snapshot](https://help.onetsolutions.net/vps/snapshot) before changing the configuration of a database or a critical service: you keep a one-click way back.

## Common pitfalls

**Trusting the load average alone.** It mixes waiting for the CPU and waiting for the disk. `vmstat` tells them apart in one second.

**Reading the `free` column of `free -h`.** "Free" memory close to zero is normal: the cache uses it. Look at `available`.

**Keeping the first line of `vmstat` or `iostat`.** It is an average since boot, not the current state. `iostat -y` drops it.

**Measuring after the fact.** A five-minute slowdown leaves nothing in `vmstat` an hour later. Cumulative counters (PSI `avg300`, the kernel log for the OOM killer) keep a slightly longer trace.

**Believing `%util` on NVMe.** At 100%, a disk that serves requests in parallel can still absorb more. Look at latency.

**Mistaking the victim for the culprit.** The process waiting on the disk (high `iodelay`) is not necessarily the one saturating it (high `kB_wr/s`).

## Going further

* [VPS offers](https://help.onetsolutions.net/vps/offers): the ranges, their processors and memory
* [64 GB RAM VPS: GP-64 and P-64](https://blog.onetsolutions.net/en/64gb-ram-vps-gp-64-p-64.md), and how to switch from the console
* [Disk full on a Linux VPS](https://blog.onetsolutions.net/en/no-space-left-on-device-linux-vps.md): find and free space
* [Extend a partition](https://help.onetsolutions.net/tutorials/how-to-extend-a-partition) after moving to a larger plan
* [KVM console](https://help.onetsolutions.net/vps/kvm-console) and [VPS won't boot: rescue mode](https://blog.onetsolutions.net/en/vps-rescue-mode-repair-server-that-wont-boot.md)
* [Back up a Linux VPS with restic](https://blog.onetsolutions.net/en/backup-linux-vps-restic-files-databases.md): schedule it outside peak hours

Have a question about a server hosted with us? [Our team is available](https://help.onetsolutions.net/console/support) from your client area.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.