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.
More on Scaling Prometheus, Long-Term Storage & HA
What are the practical limits of a single Prometheus server?IntermediateWhen does hierarchical federation still make sense?IntermediateHow do you shard Prometheus scraping, and what do you lose?AdvancedCompare Thanos, Grafana Mimir and VictoriaMetrics.AdvancedThanos sidecar versus Thanos Receive: how do you choose?AdvancedWhat is Prometheus agent mode and when do you use it?Intermediate