Linux load average: what the three numbers mean and when to worry
The Linux load average is the average number of processes that are running or waiting to run, over the last 1, 5 and 15 minutes. Compare it with the number of CPU cores: on a 4-core server, a load of 4 means every core is busy, and anything above means work is queueing. On Linux the count also includes processes waiting on disk or network storage, so load can be high while the CPU sits idle.
Read the load average
uptime
14:02:11 up 12 days, 3:41, 1 user, load average: 3.12, 1.85, 0.90
nproc # number of CPU cores to compare againstThe three numbers are the last 1, 5 and 15 minutes. Reading them left to right shows the trend: here load is rising, because the last minute is busier than the last quarter of an hour. top, w and cat /proc/loadavg show the same figures.
| Load compared with cores | What it means |
|---|---|
| Well below the core count | Spare capacity |
| About equal to the core count | Fully used; new work starts waiting |
| Above the core count for minutes | Work queues and responses slow down |
| High while CPU is mostly idle | Processes are waiting on disk or storage, not CPU |
Is it CPU or I/O?
vmstat 1 5 # r: runnable processes, b: blocked on I/O, wa: CPU time waiting on I/O
top # %Cpu(s): us and sy are work, wa is I/O wait, st is time stolen by the host- High
rand highusorsy: the CPU is the limit. Find the process withtopand pressPto sort by CPU. - High
borwa: processes wait on disk.iostat -x 1(package sysstat) shows which disk is saturated, andsudo iotop(package iotop) which process reads or writes. A server that swaps hard shows up here too; see how to check memory usage on Linux. - High
st: on a VPS with shared CPU, other tenants on the same host take CPU time from you. A dedicated-CPU plan is the fix.
Bring the load down
- Stop or reschedule the batch job, backup or build that runs at the busy time.
- Cap a noisy container with
--cpusorcpusin Compose so it cannot take every core. - For I/O wait, move logs, databases or Docker data to a faster or separate volume, or clean up the disk.
- When load stays above the core count at normal traffic, the server is too small for what runs on it.