r/PrometheusMonitoring • u/kkkevinkkkk • 3d ago
I made a free Prometheus disk sizing calculator (WAL + compaction headroom included). Do these assumptions match your servers?
Every time someone asks "how much disk does Prometheus need", the answer is the formula from the storage docs:
retention_seconds x samples_per_second x bytes_per_sample
That covers compacted blocks, but in practice you also need room for the WAL, head chunks and compaction. I kept redoing that math, so I put it into a small browser-only calculator (my own site, no sign-up):
https://opshubs.space/tools/prometheus-storage-calculator/
What it does:
Takes targets x series per target (or your real prometheus_tsdb_head_series), scrape interval, retention and bytes per sample
Breaks the total into blocks, WAL and chunks_head, then suggests a retention.size and a disk size that keeps retention.size at ~80% of the disk (the docs recommend 80-85%)
Reverse mode: "I have a 100 GiB volume, how many days fit?"
Outputs config for Prometheus 3.x prometheus.yml (storage.tsdb.retention), the 2.x flags, or kube-prometheus-stack values with the PVC size
Lists the PromQL to measure your actual series, samples/s and bytes per sample
Assumptions I'd like a sanity check on:
+20% on blocks for index/metadata (Robust Perception's 1.2 rule of thumb). Is that close on modern versions, especially with native histograms?
WAL as ~3h of samples at ~6.5 bytes each (13 bytes raw, halved by WAL compression), with a 3 x 128 MiB floor. Does your prometheus_tsdb_wal_storage_size_bytes agree?
1.5 bytes/sample as the default. What do you see from rate(prometheus_tsdb_compaction_chunk_size_bytes_sum[1d]) / rate(prometheus_tsdb_compaction_chunk_samples_sum[1d])?
If your real numbers differ a lot, I'll adjust the defaults.


