Autovacuum cost limits throttle vacuum during peak I/O periods
infoperformanceUpdated Feb 26, 2026
Technologies:
How to detect:
Default autovacuum_vacuum_cost_delay (2ms) and autovacuum_vacuum_cost_limit (inherited from vacuum_cost_limit, typically -1 meaning use default) throttle autovacuum I/O to prevent impact on foreground queries. The cost limit is distributed among running autovacuum workers, potentially slowing vacuum operations when multiple workers are active.
Recommended action:
Monitor postgresql.vacuum.count and vacuum completion times. If vacuums consistently fail to complete during low-activity windows, adjust autovacuum_vacuum_cost_limit upward. For systems with dedicated I/O capacity, increase cost limit or reduce cost delay. Track blk_read_time and blk_write_time to correlate vacuum throttling with I/O performance. Consider per-table cost settings for critical tables.