Site Reliability Engineering interview question · Most asked
A Linux server has a high load average. How do you find out why?
Summary
Load average counts runnable tasks plus tasks in uninterruptible sleep (usually waiting on disk or network I/O), averaged over 1, 5 and 15 minutes. Compare it with the CPU count, then check whether CPU is busy (top, mpstat), tasks are blocked on I/O (vmstat 'b' column, iostat -x), memory is short (swapping, free, vmstat si/so), or something else saturates.
Longer Answer
A quick sequence (similar to Brendan Gregg's "Linux performance analysis in 60 seconds"): uptime, dmesg | tail (OOM kills, errors), vmstat 1, mpstat -P ALL 1, pidstat 1, iostat -xz 1, free -m, sar -n DEV 1, sar -n TCP,ETCP 1, top. High load with idle CPU usually means I/O wait or many blocked threads; high load with saturated CPU means not enough CPU (or a runaway process). In containers, also check CPU throttling from cgroup limits.
Key Points
- Load = runnable + uninterruptible tasks.
- Compare with CPU count.
- CPU vs I/O vs memory vs throttling.
- vmstat, mpstat, iostat, pidstat, dmesg.
More most-asked Site Reliability Engineering questions
- What is Site Reliability Engineering, and how does it relate to DevOps?
- What makes a good alert? Explain symptom-based alerting and alert fatigue.
- What is an error budget, and how should it be used?
- Define SLI, SLO and SLA, and explain how they relate.
- What is burn-rate alerting, and why is it better than alerting on raw error rates?
- How do you choose good SLIs for a service?
- What are the four golden signals?
- What is the difference between monitoring and observability? Explain metrics, logs and traces.