VictoriaMetrics Tuning Fixes // SeriesStore Lab
Cutting Pod Churn with scrape-prometheus.yml Relabeling
Filtering junk debug metrics and ephemeral container labels at scrape time cuts active series count by 30-55% with zero loss of actionable SLO telemetry.
Measured TSDB & Cardinality Telemetry
Default exporters (kube-cadvisor, kube-state-metrics, Go runtime) emit dozens of per-bucket or internal GC metrics never queried in Grafana. Dropping them inside metric_relabel_configs shrinks both RAM (0.8-1.3 KB/series) and multi-year disk consumption.
| Subsystem / Signal | Measured Footprint | Operational Impact |
|---|---|---|
| Drop go_gc_* & process_virtual_* | 12 - 18% series drop | Zero impact on application latency or error panels |
| Labeldrop container_label_* & id | 25 - 40% series drop | Eliminates Docker/containerd hash churn |
| Keep Critical Pod Labels | namespace, pod, container | Preserves all Kubernetes alerting rules |
Step-by-Step Diagnostic & Config Remediation
- Audit top 20 metrics in vmui: Open http://host:8428/vmui/#/cardinality to inspect high-cardinality offenders.
- Add metric_relabel_configs rules: Drop noisy runtime histograms and ephemeral container labels inside scrape-prometheus.yml.
- Hot-reload scrape config: Send SIGHUP or POST /-/reload to apply changes with zero dropped scrapes.
scrape_configs:
- job_name: "kube-cadvisor"
metric_relabel_configs:
- source_labels: [__name__]
regex: "container_tasks_state|container_memory_failures_total"
action: drop
- regex: "id|image|container_label_.*"
action: labeldrop
Diagnostic FAQ
What is the difference between relabel_configs and metric_relabel_configs?
relabel_configs runs before scraping targets (discovery metadata); metric_relabel_configs filters scraped time series before storage.
Can VictoriaMetrics reload scrape-prometheus.yml without restarting?
Yes. Send POST http://127.0.0.1:8428/-/reload or kill -HUP $(pidof victoria-metrics-prod).