When a server is slow, check the four resources in turn instead of guessing.
uptime # load averages over 1, 5 and 15 minutes
vmstat 1 5 # CPU, memory, swap and blocked processes per second
free -m # memory, and how much is truly "available"
iostat -xz 1 3 # disk utilisation and wait times (package sysstat)
ss -s # socket summary
| Sign | Likely cause |
|---|---|
| Load far above the CPU core count | CPU saturation or many processes blocked on disk |
High si/so in vmstat |
Swapping: not enough memory |
%util near 100 and high await |
Disk is the bottleneck |
wa (I/O wait) high in top |
Processes waiting on disk or network storage |
Read available memory, not “free”: Linux uses spare memory for the page cache and gives it back when needed. Install sysstat and enable collection to keep history, because a problem that has gone away still needs explaining.