Hi hackers,

There is a comment in autovacuum.c:
| XXX todo: implement sleep scale factor that existed in contrib code.
and the attached is a patch to implement it.

In contrib code, sleep scale factor was used to adjust naptime only to
lengthen the naptime. But I changed the behavior to be able to shorten it.

In the case of a heavily update workload, the default naptime (60 seconds)
is too long to keep the number of dead tuples low. With my patch, the naptime
will be adjusted around 3 seconds at the case of pgbench (scale=10, 80 tps)
with default other autovacuum parameters.

I have something that I want to discuss with you:
 - Can we use the process-exitcode to make autovacuum daemon to communicate
   with postmaster? I used it to notify there are any vacuum jobs or not.
 - I removed autovacuum_naptime guc variable, because it is adjusted
   automatically now. Is it appropriate?

Comments welcome.

ITAGAKI Takahiro
NTT Open Source Software Center

Attachment: autovacuum_adjust_naptime-0817.patch
Description: Binary data

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to