Estimate resources for a Prometheus that will hold 2 million active series with 30-day retention.
AdvancedScenarioLong-Term Storage, Scale and Cost
Answer
Situation read → Size memory from active series and disk from samples per second.
What I'd do →
- Samples/s: 2M series / 30 s interval ≈ 66,700 samples/s.
- Disk: 66,700 × 2,592,000 s (30 days) × ~1.5 bytes ≈ 260 GB, plus WAL and compaction headroom: provision ~400 GB.
- Memory: a few KB per active series ≈ 8–12 GB for the head, plus queries and churn: plan 24–32 GB.
- CPU: 4–8 cores; more for heavy rule evaluation.
- Validate with a load test (
avalanchegenerating synthetic series) and watchprocess_resident_memory_bytes.
Why → Estimates prevent OOMs and full disks after go-live.
Interview tip → At this size, discuss sharding or a remote store rather than a single huge Prometheus.
More on Long-Term Storage, Scale and Cost
Prometheus keeps 15 days of data, but leadership wants 13 months of metrics for capacity planning. What do you build?IntermediateThe Thanos compactor has halted and the bucket keeps growing. What do you do?AdvancedGrafana shows every series twice after you added a second Prometheus replica with Thanos. How do you fix it?IntermediateRemote write to your central store is falling further behind every hour. How do you handle it?AdvancedMimir rejects writes from a team with `err-mimir-max-series-per-user`. What do you do?IntermediateYour observability SaaS bill tripled in a quarter, driven by custom metrics. How do you bring it down?Intermediate