The price of touching a page already in shared_buffers: 1 unit, the baseline of the cost model. It exists so even a fully cached vacuum pays something and yields the CPU on schedule. In a warm cache, hits dominate the page count but almost none of the budget: the dirty pages do.
DEMO — one vacuum pass, toy table14 GB heap · 1,740,000 pages
defaults (200 · 2 ms)1 min · 154.7 MB/s
sliders15 min · 15.5 MB/s
autovacuum_vacuum_cost_limit200
cost units the worker may spend before it sleeps · default 200
autovacuum_vacuum_cost_delay20 ms
how long it sleeps · default 2 ms since Postgres 12, 20 ms before