The mystery of Linux load averages
Summary
Brendan Gregg reconstructs why Linux includes not only runnable processes but also tasks in uninterruptible wait in the load average. Linux shows load averages for one, five and fifteen minutes. The relevant patch dates from 1993.
Ideas
- The load average counts runnable and certain blocked tasks.
- Uninterruptible waiting mostly appears as process state D.
- Three smoothed values describe different time windows.
- An old kernel patch extended the calculation to waiting tasks.
Insights
- Load average measures demand, not simply CPU utilisation.
- Historical implementation decisions shape today's operational metrics.
- A single metric can mix CPU and I/O pressure.
Facts
- Other Unix systems calculate the metric partly differently.
Recommendations
- Under high load, check CPU, run queue and D states at the same time.
- Do not alert on a fixed load threshold alone.
References
Links to the original source and the Web Archive open in a new tab.