Re: Adjust autovacuum naptime automatically

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: Adjust autovacuum naptime automatically
Date: 2006-08-17 02:33:50
Message-ID: 20060817023350.GK318@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

ITAGAKI Takahiro wrote:

> 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.

Interesting. To be frank I don't know what the sleep scale factor was
supposed to do.

> 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 can only tell you we do this is Mammoth Replicator and it works for
us. Whether this is a very good idea, I don't know. I didn't find any
other means to communicate stuff from dying processes to the postmaster.

> - I removed autovacuum_naptime guc variable, because it is adjusted
> automatically now. Is it appropriate?

I think we should provide the user with a way to stop the naptime from
changing at all. Eventually we will have the promised "maintenance
windows" feature which will mean the user will not have to worry at all
about the naptime, but in the meantime I think we should keep it.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Dunstan 2006-08-17 02:47:22 Re: Enum proposal / design
Previous Message Tom Dunstan 2006-08-17 02:14:20 Re: Enum proposal / design

Browse pgsql-patches by date

  From Date Subject
Next Message ITAGAKI Takahiro 2006-08-17 03:55:28 Re: pgstattuple extension for indexes
Previous Message ITAGAKI Takahiro 2006-08-17 01:45:00 Adjust autovacuum naptime automatically