Prometheus & TSDB Errors // SeriesStore Lab
Prometheus remote_write Queue Saturation & Sample Drops
Using a full Prometheus server purely as a remote_write forwarder wastes gigabytes of RAM on local head blocks and drops samples whenever network latency spikes.
Measured TSDB & Cardinality Telemetry
Prometheus remote_write reads from its local WAL and spawns parallel queue shards in memory. During bursts or SaaS 429 throttling, queue memory spikes rapidly before samples are discarded. Replacing the forwarder with vmagent cuts scraper RAM by 85% and spools bursts cleanly to disk.
| Subsystem / Signal | Measured Footprint | Operational Impact |
|---|---|---|
| Prometheus as Forwarder (1M series) | 3.8 - 5.4 GB RAM | Maintains full head block + WAL just to forward |
| vmagent Forwarder (1M series) | 320 - 540 MB RAM | Disk-backed persistent queue during outages |
| Direct VM Ingestion Port | :8428/api/v1/write | Accepts Prometheus remote_write natively |
Step-by-Step Diagnostic & Config Remediation
- Audit remote_write failed samples: Check prometheus_remote_storage_samples_dropped_total for silent telemetry loss.
- Offload scraping to vmagent or VM: Let VictoriaMetrics scrape directly via -promscrape.config or forward via lightweight vmagent.
- Configure disk-backed tmpDataPath: Point -remoteWrite.tmpDataPath to NVMe/SSD so network outages buffer safely on disk.
# Replace heavy Prometheus forwarder with vmagent: /usr/local/bin/vmagent-prod \ -promscrape.config=/etc/victoriametrics/scrape-prometheus.yml \ -remoteWrite.url=http://vm-node:8428/api/v1/write \ -remoteWrite.tmpDataPath=/var/lib/vmagent-buffer \ -remoteWrite.maxDiskUsagePerURL=10GB
Diagnostic FAQ
Can VictoriaMetrics single-node scrape Prometheus targets directly?
Yes. Passing -promscrape.config=scrape-prometheus.yml lets single-node VictoriaMetrics scrape and store metrics in one binary.
Is remote_write compression enabled automatically?
Yes. VictoriaMetrics supports Snappy and ZSTD remote_write compression automatically.