Capacity Planning
Capacity Planning in LPIC-2 201-450 tests whether you can measure CPU, memory, disk and network consumption, establish a baseline, and use trends to predict exhaustion. The exam favors interpreting tool output over memorizing product names.
Measure before predicting
- A baseline is a recorded profile of normal operation. Compare current samples with it; a single
topsnapshot cannot establish capacity. vmstat 1reports runnable (r) and blocked (b) tasks, swap in/out (si/so), block I/O (bi/bo), I/O wait (wa) and idle (id).iostat -x 1adds per-device%util,await, and queue behavior.sar -u,sar -r,sar -d, andsar -n DEVuse historical data collected bysadc, which is what makes trend prediction possible.free -mmust be read with buffers/cache in mind; Linux uses free RAM for page cache.- Load average counts uninterruptible tasks, so storage stalls can raise it without CPU saturation.
Worked example
vmstat 1 5 shows r=1, b=6, si=0, so=0, us=10, sy=5, id=35, wa=50. Reasoning: the CPU is idle 35 percent and waiting on I/O 50 percent; six tasks are blocked and there is no swapping. The bottleneck is disk I/O, not RAM. Confirm with iostat -x 1: a device near 100 percent %util with high await supports that conclusion. Adding memory would not fix this sample.
Traps
- Treating low
freeas a memory shortage while ignoring cache andavailable. - Reading load average as a CPU-only metric.
- Predicting from one sample instead of a time series.
- Missing that
bandwausually point at storage.