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

# How to Fix a Slow Linux Server with High Load

> Server slow with high load? Compare load average with nproc, then use top, iostat and vmstat to find whether CPU, disk I/O, memory or traffic is the cause.

A slow Linux server with high load has more work queued than it can handle. Compare the load average from `uptime` with the number of CPU cores from `nproc`: a load well above the core count for minutes means overload. Then run `top` to see whether one process eats the CPU, the disk is too busy (`wa`), memory is swapping, or the hypervisor is short of CPU (`st`), and fix that cause.

```text theme={null}
 14:05:50 up 12 days,  3:41,  1 user,  load average: 9.84, 8.12, 6.40
```

| Difficulty | Time | Works on | Needs |
| - | - | - | - |
| Intermediate | 10 to 30 minutes | Ubuntu 22.04 / 24.04, Debian 12 / 13, AlmaLinux and Rocky Linux 9 / 10 | Root or sudo access |

## Before you start

* If SSH is too slow to use, log in through the [VNC console](https://help.freakhosting.com/portals/vps-panel/how-to-enable-and-use-vnc-console-access.md), and look at the graphs in [resource usage](https://help.freakhosting.com/portals/vps-panel/how-to-monitor-vps-resource-usage.md).
* The three load numbers are averages over 1, 5 and 15 minutes. Rising numbers mean it is getting worse. See [what is load average](https://help.freakhosting.com/portals/other/what-is-load-average-on-linux.md).
* Commands use `sudo`. As root, leave it out.

## Step 1: Is the load really too high?

```bash theme={null}
uptime
nproc
```

On a server with `4` cores, a load of `4` means fully busy and `9.84` means work is waiting. A load below the core count is usually fine, even if it looks big.

## Step 2: Read the CPU line in top

```bash theme={null}
top
```

```text theme={null}
%Cpu(s): 12.0 us,  3.1 sy,  0.0 ni,  8.4 id, 74.2 wa,  0.0 hi,  0.3 si,  2.0 st
```

| Field | High value means | Go to |
| - | - | - |
| `us` + `sy` | Programs use the CPU | Cause 1 |
| `wa` | Processes wait for the disk | Cause 2 |
| `st` | The hypervisor gives your VPS less CPU time than it asks for | Cause 5 |

Press **P** in `top` to sort by CPU, **M** to sort by memory, and **q** to quit.

## Cause 1: A process uses all the CPU

**Check:**

```bash theme={null}
ps -eo pid,user,%cpu,%mem,etime,cmd --sort=-%cpu | head -n 8
```

**Fix:** depends on what it is:

* **Your app or game server** after an update or under heavy use: restart it (`sudo systemctl restart myapp`), check its log, and cap it if needed with [CPU and memory limits](https://help.freakhosting.com/portals/other/how-to-limit-cpu-and-memory-for-a-process.md).
* **A stuck script or cron job** (`php`, `python`, `backup.sh`): stop it with [kill](https://help.freakhosting.com/portals/other/how-to-kill-a-process-on-linux.md) and fix the schedule.
* **A process you don't recognise**, with a random name or running from `/tmp`: treat it as a possible compromise. Follow [what to do if your server is hacked](https://help.freakhosting.com/portals/other/what-to-do-if-your-linux-server-is-hacked.md).

## Cause 2: The disk is the bottleneck

High `wa` and processes in state `D` (waiting for the disk) mean storage can't keep up.

**Check** which disk is busy and which process causes it (both tools come in the `sysstat` package: `sudo apt install sysstat` or `sudo dnf install sysstat`):

```bash theme={null}
iostat -xz 1 3
sudo pidstat -d 1 5
```

In `iostat`, a `%util` near 100 and a high `w_await` or `r_await` (milliseconds) show an overloaded disk. `pidstat -d` lists processes by `kB_rd/s` and `kB_wr/s`.

**Fix:** move backups and large copies to quiet hours, add database indexes for slow queries, and stop swapping (Cause 3). See [check disk I/O performance](https://help.freakhosting.com/portals/other/how-to-check-disk-io-performance-on-linux.md).

## Cause 3: Memory is full and the server swaps

When RAM runs out, Linux moves memory to swap on disk, which is very slow.

**Check:**

```bash theme={null}
free -h
vmstat 1 5
```

Values that stay above `0` in the `si` and `so` columns (swap in and out) mean active swapping.

**Fix:** lower the memory settings of the largest programs or add RAM. See [processes killed by the OOM killer](https://help.freakhosting.com/portals/other/how-to-fix-out-of-memory-killed-processes.md) and [check memory usage](https://help.freakhosting.com/portals/other/how-to-check-memory-usage-on-linux.md).

## Cause 4: A traffic spike or attack

Many visitors, a crawler or a flood of requests creates many web or PHP workers.

**Check:**

```bash theme={null}
ss -s
sudo awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head
```

The second command counts requests per IP (use `/var/log/apache2/access.log` or `/var/log/httpd/access_log` for Apache).

**Fix:** block abusive IPs, rate-limit with [Fail2ban](https://help.freakhosting.com/portals/other/how-to-set-up-fail2ban-for-ssh-on-ubuntu.md) or [CrowdSec](https://help.freakhosting.com/portals/other/how-to-install-crowdsec-on-linux.md), add caching, and use the [DDoS filters](https://help.freakhosting.com/portals/firewall/how-to-apply-ddos-filters.md) for network floods.

## Cause 5: CPU steal time

`st` is CPU time your VPS wanted but the host gave to other work. A few percent now and then is normal.

**Check:**

```bash theme={null}
vmstat 1 10
```

The `st` column under `cpu` shows it each second.

**Fix:** if `st` stays high (for example above 10%) for a long time while your own usage is normal, [open a ticket](https://freakhosting.com/clientarea/submitticket.php) with the `vmstat` output and the time it happened.

## How to check it worked

```bash theme={null}
uptime
```

The 1-minute load should drop below your core count within a few minutes of the fix, followed by the 5- and 15-minute values.

## Frequently asked questions

### Load is high but CPU is idle. How?

Load also counts processes waiting for the disk (state `D`). High load with high `wa` and low `us` points to storage, not CPU (Cause 2).

### What load is "too high" for my server?

Divide the load by `nproc`. Up to about 1.0 per core is busy but fine. Consistently above that, work waits and the server feels slow.

### Should I just reboot?

A reboot clears the symptom, not the cause. Collect the `top` and `vmstat` output first so you can find out why it happened.

## Related guides

> [card] [VPS and dedicated server guides](https://help.freakhosting.com/portals/other/vps-and-dedicated-server-guides.md)
>
> Every guide in this section.

> [card] [What is load average?](https://help.freakhosting.com/portals/other/what-is-load-average-on-linux.md)
>
> The three numbers explained.

> [card] [Find what uses CPU](https://help.freakhosting.com/portals/other/how-to-find-what-is-using-cpu-on-linux.md)
>
> Track down busy processes.

> [card] [Monitor with htop](https://help.freakhosting.com/portals/other/how-to-monitor-server-resources-with-htop.md)
>
> A friendlier live view.

> [card] [Check disk I/O performance](https://help.freakhosting.com/portals/other/how-to-check-disk-io-performance-on-linux.md)
>
> Measure and read iostat.

***

> [!NOTE]
>
> **Checked against the official [procps top](https://man7.org/linux/man-pages/man1/top.1.html), [vmstat](https://man7.org/linux/man-pages/man8/vmstat.8.html) and [proc\_loadavg](https://man7.org/linux/man-pages/man5/proc_loadavg.5.html) manuals and the [sysstat documentation](https://sysstat.github.io/)** on 4 November 2026; every command on this page was run on Ubuntu 24.04 LTS to confirm its syntax and output columns. The ticket threshold for steal time is a rule of thumb, not a FREAKHOSTING limit.

> [!NOTE]
>
> ### Need Extra Help?
>
> If you encounter any issues, our support team is ready to assist:
>
> * **Live Chat:** Quick assistance via our website.
> * **Support Ticket:** [Open a Ticket](https://freakhosting.com/clientarea/submitticket.php)
> * **Discord:** [Join our Community](https://discord.gg/freakhosting)
> * **Email:** [support@freakhosting.com](mailto:support@freakhosting.com)

> [!TIP]
>
> ### Save on Your Hosting
>
> Ready to upgrade your hosting? Use code **KB20** at checkout for **20% off** your first order!

***

**Last Updated:** November 2026


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