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

# Check your VPS's load, memory and disk space

> Find out why your Linux VPS is slow or full, using a few simple commands.

If your VPS feels slow, or software complains that the disk is full, a few commands show you what's using its resources. This guide shows you what to run and how to read the results.

> [!NOTE]
>
> On shared hosting, use cPanel instead. See [Check disk and resource usage](https://kb.hostcloud.in/cpanel/check-disk-and-resource-usage.md).

First, [connect to your VPS with SSH](https://kb.hostcloud.in/vps/access-your-vps-over-ssh.md), or open **Console** in the server panel.

## Quick check

| What | Command | What to look for |
| - | - | - |
| Load | `uptime` | The three "load average" numbers. Compare them with your number of vCPUs. A load higher than that for a long time means the server is overloaded |
| Memory | `free -h` | The **available** column. Near zero means the server is out of memory |
| Disk | `df -h` | The **Use%** column for `/`. Above 90% needs attention |

Your number of vCPUs is shown on the server panel in the Client Area, or run `nproc`.

## Find what's using the CPU and memory

Run `top`. The busiest programs are at the top of the list.

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

> [!TIP]
>
> For an easier view, install `htop`: `apt install htop` on Ubuntu or Debian, or `dnf install htop` on AlmaLinux, Rocky Linux or Fedora. Then run `htop`.

## Find what's filling the disk

**1. List the biggest folders**

Run:

```bash theme={null}
du -xh / --max-depth=2 2>/dev/null | sort -h | tail -20
```

The largest folders are at the bottom.

**2. Look deeper**

Repeat with the biggest folder, for example `du -xh /var --max-depth=2 2>/dev/null | sort -h | tail -20`.

Common space users:

| Folder | Usually holds | Safe fix |
| - | - | - |
| `/var/log` | Log files | `journalctl --vacuum-size=200M` trims the system log |
| `/var/cache` | Downloaded update packages | `apt clean` (Ubuntu/Debian) or `dnf clean all` (AlmaLinux/Rocky/Fedora) |
| `/home` or your website folder | Uploads, old backups | Download old backups, then delete them from the server |

> [!WARNING]
>
> Don't delete files you don't recognise, especially in `/usr`, `/etc` or `/var/lib`. Removing system or database files can stop your server from starting. Take a snapshot from the **Snapshots** tab first if you're unsure.

## If it keeps happening

* **Restart a stuck program** rather than the whole server, for example `systemctl restart nginx`.
* **Your server may be too small** for its work. You can move to a bigger plan from the service sidebar with **Upgrade/Downgrade Options**. See [Upgrade or downgrade a plan](https://kb.hostcloud.in/billing/upgrade-downgrade.md).

HostCloud VPS is semi-managed: you look after the software on your server. See [Support hours and scope](https://kb.hostcloud.in/support/support-scope-and-hours.md).

Still stuck? [Open a ticket](https://kb.hostcloud.in/support/open-a-ticket.md) with your server's IP address and the output of `uptime`, `free -h` and `df -h`.


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