Skip to content

Vacuum Metrics

This page documents Prometheus metrics related to vacuum operations in Yellowbrick — both autovacuum and manual vacuum — which help manage table bloat, reclaim dead tuples, and prevent transaction ID wraparound.

Purpose

Vacuum metrics are critical for monitoring the health and efficiency of background maintenance processes. They help:

  • Track how often tables are vacuumed across databases
  • Distinguish between automatic and manual vacuums
  • Detect stale or unvacuumed tables (e.g. through long “time since last vacuum”)
  • Measure the duration and frequency of vacuum operations

These metrics support bloat management, query performance tuning, and alerting for vacuum starvation or regressions in autovacuum behavior.

Metrics

NameTypeFreqLabelsDescription
yb_active_autovacuum_countgauge1m-Number of currently active autovacuum processes
yb_active_manual_vacuum_countgauge1m-Number of currently active manual vacuum processes
yb_time_since_last_vacuum_seconds_bucketcounter1mle, database_oidCumulative count of tables since last vacuum (manual or auto), grouped by database
yb_time_since_last_vacuum_seconds_countcounter1mdatabase_oidTotal number of vacuumed tables per database
yb_time_since_last_vacuum_seconds_sumgauge1mdatabase_oidTotal time since last vacuum across all tables per database
yb_vacuum_time_seconds_bucketcounter1mleCumulative count of vacuum operations running ≤ each duration bucket
yb_vacuum_time_seconds_countcounter1m-Total number of currently running vacuum operations
yb_vacuum_time_seconds_sumgauge1m-Total execution time of all currently running vacuum operations