Prometheus Storage Calculator

Estimate Prometheus disk space and memory from series count, scrape interval and retention, and compare TimescaleDB - free, online, no sign-up.

This Prometheus storage calculator estimates how much disk and memory your Prometheus server needs from active series, scrape interval, retention and bytes per sample, using the formula in the Prometheus storage docs. It doubles as a Prometheus and TimescaleDB retention calculator: the same metrics are sized as a compressed TimescaleDB hypertable for comparison. It is free, and nothing you enter leaves your browser.

Measure ingestion by

Your current number: prometheus_tsdb_head_series

Memory and TimescaleDB assumptions

Estimates, not from the Prometheus or TimescaleDB docs. Measure memory with go_memstats_alloc_bytes / prometheus_tsdb_head_series (double it for RSS), and compression with hypertable_compression_stats().

Disk per server
Memory per serverestimate, head block
Retention flags
Same data in TimescaleDB

Disk follows the formula in the Prometheus storage docs; WAL, memory and TimescaleDB figures are estimates you can adjust. Nothing you enter is saved or sent anywhere.

Why use this Prometheus storage calculator

The formula from the Prometheus docs

Retention seconds times samples per second times bytes per sample, plus the WAL and the 20% the docs say to keep free.

Retention flags ready to paste

Get matching retention.time and retention.size values, or enter a disk size and see how many days it holds.

Prometheus and TimescaleDB side by side

See what the same samples cost as a TimescaleDB hypertable, uncompressed and with a compression policy, before choosing a long-term store.

How to calculate Prometheus storage

  1. Enter your ingestion. Give active series and the scrape interval, targets times series per target, or the samples per second you measured in Prometheus; the query to measure it is shown under the input.
  2. Set the retention. Pick how many days to keep. Prometheus keeps 15 days unless you set --storage.tsdb.retention.time.
  3. Adjust bytes per sample. The Prometheus docs put the average at 1 to 2 bytes. Use 1.5 to start, or measure your own with the chunk-size query under the slider.
  4. Add servers and a disk size. Choose 2 for an HA pair, which stores everything twice. Enter a disk size to see how many days it holds.
  5. Copy the retention flags. Copy the retention.time and retention.size flags that match the result, and compare the TimescaleDB figures if you are weighing a SQL store.

Prometheus and TimescaleDB retention, compared

Prometheus writes samples into two-hour blocks, compacts them into larger ones, and deletes whole blocks once they pass the retention time or size. TimescaleDB stores samples as rows in a hypertable, drops old chunks with a retention policy, and compresses chunks older than a set age into columnar form. Prometheus is the smaller of the two per sample; TimescaleDB gives you SQL, joins and years of history in one database. Many teams keep a few weeks in Prometheus and remote-write to a long-term store for the rest.

Common Prometheus storage problems and fixes

  • The disk fills up before the retention time: ingestion grew since you sized it. Set --storage.tsdb.retention.size to 80 to 85% of the disk as a safety net, then find the growth with topk(10, count by (__name__)({__name__=~".+"})).
  • Series keep climbing: a label with unbounded values (user ID, request path, pod hash) creates new series constantly. Drop or relabel it with metric_relabel_configs; it costs both disk and memory.
  • Prometheus runs out of memory: memory tracks active series, so retention changes will not help. Reduce cardinality, drop unused metrics at scrape time, or shard targets across more than one Prometheus.
  • Disk use jumps every few hours: that is compaction writing a larger block before deleting the smaller ones. It is why the docs recommend keeping 15 to 20% of the disk free.
  • Startup takes a long time after a crash: Prometheus is replaying the write-ahead log. A large WAL comes from a high ingestion rate; fast local SSD shortens the replay.
  • Old data is still there after lowering retention: Prometheus deletes whole blocks, and large compacted blocks can span up to 10% of the retention time, so some data lives a little longer than the setting.

Sizing other parts of the stack? The vector database storage calculator does the same for embeddings, and the vLLM memory calculator for model servers. To graph what Prometheus collects, the Grafana developer guide covers a self-hosted setup, and Grafana launches ready to use from the Meetrix store. You can also browse all Meetrix features.

Frequently Asked Questions

Is this Prometheus storage calculator free?

Yes. It is free, needs no account, and has no limit on how many configurations you try.

Is anything I enter sent anywhere?

No. Every figure is calculated in your browser; nothing you type is saved or sent to Meetrix or anyone else. The page records anonymous usage events (the calculator was used, the flags were copied), not your values.

How do you calculate Prometheus storage?

The Prometheus docs give the formula: needed_disk_space = retention_time_seconds * ingested_samples_per_second * bytes_per_sample. Samples per second is active series divided by the scrape interval, and Prometheus stores 1 to 2 bytes per sample on average. The calculator adds the write-ahead log and keeps 20% of the disk free for compaction.

How much disk does Prometheus need?

For 100,000 active series scraped every 15 seconds, 15 days of retention is about 12 GiB of blocks at 1.5 bytes per sample, or about 16 GiB of disk with headroom. One million series every 15 seconds for 30 days is about 241 GiB of blocks and a 305 GiB disk. Storage scales linearly with series, retention and scrape frequency.

How much memory does Prometheus need?

Memory follows the number of active series, not retention. The Prometheus docs give no fixed figure; a common way to measure it is go_memstats_alloc_bytes / prometheus_tsdb_head_series, doubled for resident memory with the default Go garbage collector settings. The calculator assumes 8 KiB per series, so 1 million series is about 7.6 GiB. Heavy queries and recording rules add to it.

What is the default Prometheus retention?

15 days. Change it with --storage.tsdb.retention.time (for example 30d or 1y), or cap disk use with --storage.tsdb.retention.size. When both are set, whichever is reached first applies.

How should I set storage.tsdb.retention.size?

The Prometheus docs recommend setting it to at most 80 to 85% of the disk Prometheus uses, because compaction needs free space. It counts the write-ahead log and memory-mapped head chunks as well as the blocks. The calculator gives a retention.size that matches your retention time; Prometheus reads GB in that flag as a power of 1024.

How many bytes per sample does Prometheus use?

The docs say 1 to 2 on average. Steady values compress better than noisy ones, and counters better than high-precision gauges. Measure yours with rate(prometheus_tsdb_compaction_chunk_size_bytes_sum[1d]) / rate(prometheus_tsdb_compaction_chunk_samples_sum[1d]).

Does a longer scrape interval save storage?

Yes, proportionally. Going from 15 to 30 seconds halves the samples and the disk. It does not reduce memory much, because memory depends on how many series exist rather than how often they are scraped. Keep the interval short enough for the rate() windows your alerts use.

How do I store Prometheus metrics for a year or longer?

Raising local retention works for modest series counts: 10,000 series every 15 seconds is about 29 GiB for a year. For more, use remote write to a long-term store such as Thanos, Grafana Mimir or VictoriaMetrics, and keep a few weeks locally for fast queries. (Promscale, the adapter that wrote Prometheus data into TimescaleDB, has been discontinued, so TimescaleDB is now a choice when you want metrics in SQL alongside other data, loaded by your own pipeline.)

Is TimescaleDB more storage-efficient than Prometheus?

Usually not for raw samples. Prometheus's TSDB compresses to 1 to 2 bytes per sample. A TimescaleDB row with its index is tens of bytes before compression, and even with columnar compression saving around 90% it typically ends up larger. TimescaleDB earns its place with SQL, joins with business data and long-term analytics. The compression ratio depends heavily on your schema; measure it with hypertable_compression_stats().

Why does my Prometheus disk use more than the estimate?

Common causes are series churn (pods or labels that change create new series, and the head keeps inactive ones for up to an hour), an uncompacted backlog after a restart, high-cardinality labels such as user or request IDs, and compaction temporarily holding both old and new blocks. Check prometheus_tsdb_head_series over time to spot churn.

Run open source tools on your own cloud

Meetrix Store has pre-configured images for Jitsi Meet, Coturn, RustDesk, OpenVPN and 40+ more open source tools, ready to launch on AWS or Google Cloud in minutes.