Prometheus & TSDB Errors // SeriesStore Lab
Multi-Year TSDB Disk Bloat & Storage Exhaustion
Storing 12 to 36 months of 15s Prometheus metrics consumes 2.0-2.8 bytes/sample plus bloated index files—exhausting expensive cloud block volumes rapidly.
Measured TSDB & Cardinality Telemetry
Prometheus Gorilla-style XOR encoding without ZSTD block compression averages 1.5-2.8 bytes per sample and separates blocks every few days/weeks. VictoriaMetrics combines delta-of-delta encoding with ZSTD frames across merged parts, compressing production metrics down to 0.4-0.9 bytes/sample.
| Subsystem / Signal | Measured Footprint | Operational Impact |
|---|---|---|
| Prometheus TSDB Compression | 1.5 - 2.8 bytes/sample | 3x-5x larger EBS/NVMe bill for 12-36 mo retention |
| VictoriaMetrics Gorilla + ZSTD | 0.4 - 0.9 bytes/sample | Fits 12-36 months on a single $6/TB Storage Slice |
| Disk Space Headroom Rule | Keep 20% free disk | Required for background small-to-big part merges |
Step-by-Step Diagnostic & Config Remediation
- Compute actual bytes per sample: Divide storage bytes by total ingested samples over 24 hours to verify compression ratio.
- Set explicit -retentionPeriod: Pass -retentionPeriod=12 (months) or 24/36 instead of the tiny 1-month default.
- Provision InterServer $6/TB Storage Slices: Store multi-terabyte multi-year metrics archives at $6/TB instead of $100+/TB hyperscaler EBS.
# Check VictoriaMetrics actual bytes/sample in /metrics:
# vm_data_size_bytes{type="storage/big"} + storage/small
# Set 24-month retention in victoriametrics.service:
-retentionPeriod=24
-storageDataPath=/var/lib/victoria-metrics-data
Diagnostic FAQ
What is the default retentionPeriod in VictoriaMetrics?
By default VictoriaMetrics retains data for 1 month (-retentionPeriod=1). Always pass 6, 12, 24, or 36 for multi-year retention.
Why keep 20% free disk space on the metrics volume?
Background merges temporarily write a merged part before unlinking source parts, requiring ~15-20% scratch headroom.