Adjust autovacuum naptime automatically - Mailing list pgsql-patches

From ITAGAKI Takahiro
Subject Adjust autovacuum naptime automatically
Date
Msg-id 20060817103831.5F44.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
Whole thread Raw
Responses Re: Adjust autovacuum naptime automatically
List pgsql-patches
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.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

Attachment

pgsql-patches by date:

Previous
From: Greg Stark
Date:
Subject: Re: CREATE INDEX ... ONLINE
Next
From: Alvaro Herrera
Date:
Subject: Re: Adjust autovacuum naptime automatically