VictoriaMetrics Tuning Fixes // SeriesStore Lab
Zero-Downtime Prometheus TSDB Migration via vmctl
Export historical Prometheus TSDB blocks via snapshot API and stream them into VictoriaMetrics using vmctl without losing months of historical SLO baselines.
Measured TSDB & Cardinality Telemetry
Before retiring an OOM-prone Prometheus instance, enable --web.enable-admin-api briefly to cut a hard-linked TSDB snapshot. vmctl reads Prometheus blocks directly from disk and compresses them into VictoriaMetrics Gorilla+ZSTD format at 3x-5x smaller disk size.
| Subsystem / Signal | Measured Footprint | Operational Impact |
|---|---|---|
| Source Prometheus Snapshot | 500 GB TSDB blocks | 1.8 - 2.6 bytes/sample |
| Imported VictoriaMetrics Data | 110 - 165 GB compressed | 0.4 - 0.8 bytes/sample Gorilla+ZSTD |
| Import Throughput | 300k - 1M samples/sec | Parallel workers via --vm-concurrency=4 |
Step-by-Step Diagnostic & Config Remediation
- Enable dual remote_write first: Stream live Prometheus samples to VictoriaMetrics :8428/api/v1/write immediately.
- Take Prometheus TSDB snapshot: POST /api/v1/admin/tsdb/snapshot to freeze clean historical blocks.
- Run vmctl prometheus backfill: Execute vmctl prometheus --prom-snapshot=... --vm-addr=http://127.0.0.1:8428.
curl -X POST http://127.0.0.1:9090/api/v1/admin/tsdb/snapshot vmctl prometheus \ --prom-snapshot=/var/lib/prometheus/snapshots/20261111T080000Z \ --vm-addr=http://127.0.0.1:8428 \ --vm-concurrency=4
Diagnostic FAQ
Will historical timestamps overwrite live remote_write samples?
With -dedup.minScrapeInterval enabled or clean cutoff timestamps, historical and live streams merge seamlessly.
Can Grafana query both historical and live series in one panel?
Yes. Once backfilled, every historical month sits alongside live scrapes in the same VictoriaMetrics storage path.