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

NameTypeFreqLabelsVersion IntroducedVersion DeprecatedDescription
yb_active_autovacuum_countgauge1m-7.3.07.3.1Number of currently active autovacuum processes
yb_active_manual_vacuum_countgauge1m-7.3.07.3.1Number of currently active manual vacuum processes
yb_time_since_last_vacuum_seconds_bucketcounter1mle, database_oid7.3.07.3.1Cumulative count of tables since last vacuum (manual or auto), grouped by database
yb_time_since_last_vacuum_seconds_countcounter1mdatabase_oid7.3.07.3.1Total number of vacuumed tables per database
yb_time_since_last_vacuum_seconds_sumgauge1mdatabase_oid7.3.07.3.1Total time since last vacuum across all tables per database
yb_vacuum_time_seconds_bucketcounter1mle7.3.07.3.1Cumulative count of vacuum operations running ≤ each duration bucket
yb_vacuum_time_seconds_countcounter1m-7.3.07.3.1Total number of currently running vacuum operations
yb_vacuum_time_seconds_sumgauge1m-7.3.07.3.1Total execution time of all currently running vacuum operations