← Lessons

quiz vs the machine

Gold1400

Databases

Capacity Planning for Storage

Projecting data growth and headroom ahead of time prevents the avoidable outage where a database simply runs out of disk.

5 min read · core · beat Gold to climb

The Avoidable Outage

A database that fills its disk stops accepting writes and can corrupt or crash. Unlike a sudden spike, storage growth is gradual and predictable, which makes running out of space one of the most preventable outages there is. Capacity planning turns that predictability into lead time.

What Drives Growth

Projecting storage needs more than current size:

  • Data growth rate: gigabytes added per day from new rows and larger payloads.
  • Indexes and overhead: indexes, WAL, and bloat often add more than the raw row data.
  • Retention: how long you keep history before archiving or deleting bounds the total.
  • Temporary spikes: backups, vacuum, and large migrations need transient headroom.

Plan With Headroom And Lead Time

Estimate the date you would hit a danger threshold, often 75 or 80 percent full, at the current growth rate. Plan the expansion or cleanup to land well before then, because resizing volumes, archiving data, or sharding all take time. Headroom absorbs forecasting error and short spikes.

Key idea

Storage capacity planning projects predictable data growth including indexes and retention, then schedules expansion or cleanup with headroom and lead time so the database never runs out of disk.

Check yourself

Answer to earn rating on the learn ladder.

1. Why is running out of disk considered an avoidable outage?

2. Why must a storage projection include more than raw row size?

3. Why plan expansion before reaching a danger threshold like 80 percent?