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).
VictoriaMetrics Tuning Fixes // SeriesStore Lab

Optimizing MetricsQL & Rollup Query Caches

Understanding -search.latencyOffset and rollupResultCache prevents stale tail-window queries from busting VictoriaMetrics cache on every 5-second dashboard refresh.

Measured TSDB & Cardinality Telemetry

When Grafana refreshes an auto-refreshing panel every 5 seconds, querying up to "now" forces re-evaluation of unsealed recent blocks. Keeping -search.latencyOffset=30s (default) ensures recent scrapes settle cleanly and repeated Grafana views hit cached rollup series in milliseconds.

Subsystem / SignalMeasured FootprintOperational Impact
Rollup Cache Hit Latency4 - 25 msInstant Grafana dashboard rendering
Default Latency Offset30s (safe buffer)Prevents partial-scrape jitter at graph right edge
Max Concurrent Queries-search.maxConcurrentRequests=16Protects ingestion latency under dashboard storms

Step-by-Step Diagnostic & Config Remediation

  1. Inspect cache hit ratio: Query rate(vm_cache_requests_total[5m]) vs vm_cache_misses_total for rollupResult.
  2. Avoid lowering latencyOffset below 15s: Keeping offset >= scrape_interval avoids false zero drops at the right edge of panels.
  3. Tune maxConcurrentRequests to vCPU: Set 2x-4x vCPU count on Vultr High Frequency or InterServer KVM nodes.
# Query cache safety flags for 4-8 vCPU nodes:
-search.latencyOffset=30s
-search.maxConcurrentRequests=16
-search.maxQueueDuration=10s

Diagnostic FAQ

Why does the last 30 seconds of a Grafana graph sometimes look flat?

Because -search.latencyOffset=30s delays querying the active tail slightly so all distributed scrapers finish committing points.

Can I disable the response cache for debugging?

Pass nocache=1 as a query parameter on /api/v1/query_range during diagnostic benchmarks.

Related VictoriaMetrics Tuning Fixes Guides

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