Skip to main content
READY SERIESSTORE LAB // PROMETHEUS OOM VS VICTORIAMETRICS TSDB BASELINE: 2026-11-11 | TARGET: 0.8-1.3 KB/SERIES | 0.4-0.9 B/SAMPLE ZSTD
VictoriaMetrics
VictoriaMetrics Disclosure: Outbound /go/ links marked rel="sponsored" may earn a partner commission at zero checkout cost (Disclosures).
Prometheus & TSDB Errors // SeriesStore Lab

Prometheus TSDB Compaction OOM Kill (Exit 137)

Prometheus buffers raw samples in a 2-hour head block before compacting them onto disk, causing 1.5x memory spikes that trigger Linux OOM Exit 137 on 4-16 GB VPS.

Measured TSDB & Cardinality Telemetry

SeriesStore Lab kernel traces show Prometheus consumes 4.5-8.2 KB per active series in normal operation and surges 45-65% during head-to-block compaction or overlapping block merges. Switching to VictoriaMetrics removes the giant in-memory head block and bounds memory via -memory.allowedPercent.

Subsystem / SignalMeasured FootprintOperational Impact
Prometheus Head + Compaction Spike6.2 - 11.4 GB / 1M seriesExceeds 8 GB nodes during 2h compaction window
VictoriaMetrics Single-Node RSS0.85 - 1.25 GB / 1M seriesFlat RSS profile; no 2h compaction cliff
Container Restart WAL Penalty4 - 18 min recovery stallPrometheus replays gigabytes of WAL on crash

Step-by-Step Diagnostic & Config Remediation

  1. Confirm Exit 137 in dmesg or systemd: Run dmesg -T | grep -i -E "oom-killer|prometheus" to confirm cgroup or kernel OOM termination.
  2. Check compaction duration metrics: Inspect prometheus_tsdb_compaction_duration_seconds_sum to spot overlapping compaction spikes.
  3. Migrate ingest to VictoriaMetrics: Deploy single-node VictoriaMetrics on an InterServer $6/TB slice or Vultr HF node using 0.8-1.3 KB/series.
dmesg -T | grep -i -E "oom-killer|killed process|prometheus"
journalctl -u prometheus --since "2 hours ago" | grep -i compaction
# Prometheus: 4.5-8+ KB/series (+1.5x compaction) | VictoriaMetrics: 0.8-1.3 KB/series

Diagnostic FAQ

Why does Prometheus OOM kill every 2 hours on the dot?

Prometheus cuts and compacts its in-memory head block every 2 hours, temporarily holding both the active head chunks and new compacted index tables in RAM.

Does VictoriaMetrics suffer 2-hour compaction OOM spikes?

No. VictoriaMetrics flushes small parts continuously to disk and merges them incrementally within -memory.allowedPercent bounds.

Related Prometheus & TSDB Errors Guides

VictoriaMetrics: Cut Prometheus OOM RAM 80%+ on InterServer $6/TB Slice Launch $6/TB Slice