Interview Prep/Monitoring & Observability/Scaling Prometheus, Long-Term Storage & HA

How do you capacity-plan a Prometheus server?

IntermediateProductionScaling Prometheus, Long-Term Storage & HA
Answer

Inputs: active series, samples/sec, retention. Rough rules of thumb:

  • Memory: a few KB per active head series plus query headroom (2x for safety).
  • Disk: about 1–2 bytes per sample after compression × samples/sec × retention seconds.
  • CPU: grows with ingestion and rule/query load.
rate(prometheus_tsdb_head_samples_appended_total[1h]) * 86400 * 15 * 2   # bytes for 15d at ~2B/sample

Measure the real compression on your data (prometheus_tsdb_compaction_chunk_size_bytes) and leave 30–40% headroom.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Scaling Prometheus, Long-Term Storage & HA