How does Prometheus memory and disk usage scale?
AdvancedConceptKubernetes Monitoring, Scale & Cloud
Answer
Memory is driven mainly by active series in the head block (the last ~2–3 hours), not by retention. Plan for a few KB per active series including labels, chunks and index overhead, plus query load and churn (series created and dropped by pod restarts).
Disk is driven by samples ingested and retention. Compressed samples take about 1–2 bytes each:
disk ≈ retention_seconds × ingested_samples_per_second × ~1.5 bytes
prometheus_tsdb_head_series
rate(prometheus_tsdb_head_samples_appended_total[5m])
Example: 1M active series at a 30 s interval ≈ 33k samples/s; 15 days (1.296M seconds) ≈ 43B samples × 1.5 bytes ≈ 65 GB, plus WAL. So doubling retention doubles disk; doubling series doubles both memory and disk.
More on Kubernetes Monitoring, Scale & Cloud
What is kube-prometheus-stack and what does it install?BeginnerWhat CRDs does the Prometheus Operator provide?IntermediateHow does the Prometheus Operator decide which ServiceMonitors to load?IntermediateWhich cAdvisor container memory metric should you watch, and why?IntermediateHow do metrics-server and the custom/external metrics APIs relate to HPA?IntermediateWhich kube-state-metrics metrics do you use most?Beginner