Troubleshooting guide
High load average on Linux: what it means and how to fix it
Load average counts tasks that are running or waiting. On Linux, that includes tasks blocked on disk, so high load does not necessarily mean a busy CPU.
3 min read10 sectionsUpdated
On this page
What load average measures
The three numbers are exponentially weighted averages of tasks that are runnable or in uninterruptible sleep, over one, five and fifteen minutes. A load of 8 on an 8-core machine means, roughly, that demand matches capacity. A load of 8 on 2 cores means tasks are queuing.
If the one-minute number is far above the fifteen-minute number, things are getting worse right now.
Diagnose it
vmstat quickly separates CPU from I/O: the r column is runnable tasks, b is blocked, wa is I/O wait and st is steal.
# Cores and load
nproc; uptime
# r vs b, and us/sy/wa/st over 5 seconds
vmstat 1 5
# Which disk is busy (from sysstat)
iostat -xz 1 3
# Tasks stuck in uninterruptible sleep
ps -eo state,pid,wchan:20,cmd | awk '$1 ~ /D/' | headFixes
If r is high with low idle, find the CPU consumers and profile them: see high CPU usage on Linux. If wa or b is high, find the writer with iotop, and fix the query or batch job behind it, or provision faster disks. If D-state tasks are stuck on NFS, repair the mount or server. High steal means the host is contended, so move to a different instance or a larger size.
Catch it automatically
Normalise by alerting on load per core, and pair it with latency, since a busy server that meets its latency target is fine. Infrastructure monitoring lets you compare hosts side by side, and APM shows which requests slow down when load rises.
What is a good load average?
Consistently below the number of CPU cores is generally healthy, but check latency as well.
Why is load high but CPU idle?
Tasks are waiting for disk or network storage. Linux counts those in load.
Does hyper-threading change the rule?
Somewhat. Logical cores give less than full cores under heavy load, so treat the limit as approximate.
Check it now, free
- Downtime cost calculator: What an outage costs per minute, hour and year.
Related reading
- net::ERR_FAILED: how to fix it: Fix net::ERR_FAILED in Chrome and the console: CORS preflight failures, service workers, blocked requests, cache problems and extensions, step by step.
- 400 Bad Request: what it means and how to fix it: Fix a 400 Bad Request error: oversized cookies, malformed URLs, invalid JSON bodies and proxy rules, with commands to find which layer rejected it.
- 403 Forbidden: what it means and how to fix it: Fix 403 Forbidden errors: file permissions, missing index files, WAF and bot rules, IP allowlists, expired signed URLs and missing API scopes, step by step.
- No space left on device on Linux: how to fix it: Fix "No space left on device" on Linux: find large files, deleted files still open by processes, and inode exhaustion, with safe commands for a production host.
- Prometheus high cardinality: how to find and fix it: Find and fix Prometheus high cardinality: use the TSDB status page and promtool, identify runaway labels and drop them with relabeling rules before ingestion.
- 429 Too Many Requests: what it means and how to fix it: 429 Too Many Requests explained: rate limits, the Retry-After header, backoff with jitter for clients, and how to set fair rate limits on your own API.
Watch your own site and services with VitalRix
Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.