Linuxlab

Chapter 8

Capacity planning

Updated July 3, 2026

Monitoring from the last chapter answers "what now". Capacity planning answers a different question: "when do we run out, and what do we do ahead of time". A single free or df reading predicts nothing. You need history and a trend across it.

The idea is simple. You record a few numbers regularly, collect them over weeks, watch how they grow, and from the slope you estimate when the headroom ends. Then you decide: clean up, move data, or buy hardware.

Start with what already keeps history on its own. The sar daemon from the sysstat package writes metrics every ten minutes and stores them per day.

$ sar -u -f /var/log/sysstat/sa20    # CPU for the 20th
$ sar -r -f /var/log/sysstat/sa20    # memory for the same d
Locked

The rest of this chapter is part of a paid course

You are reading the open part. Buy the course to read the whole chapter.

See the course