Re: Adjust autovacuum naptime automatically

From: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Adjust autovacuum naptime automatically
Date: 2006-08-17 17:34:00
Message-ID: 44E4A888.4070507@zeut.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Jim C. Nasby wrote:
> On Thu, Aug 17, 2006 at 03:00:00PM +0900, ITAGAKI Takahiro wrote:
>
> IMO, the only reason at all for naptime is because there is a
> non-trivial cost associated with checking a database to see if any
> vacuuming is needed.
>

This cost is reduced significantly in the integrated version as compared
to the contrib version, but yes still not zero.

> One problem that I've run across is that in a cluster with a lot of
> databases it can take a very long time to cycle through all of them.
>
> Perhaps a better idea would be to check a number of databases on each
> pass. That way you won't bog the server down while checking, but it
> won't take as long to get to all the databases.
>
> Also, autovac should immediately continue checking databases after it
> finishes vacuuming one. The reason for this is that while vacuuming,
> the vacuum_cost_delay settings will almost certainly be in effect, which
> will prevent autovac from hammering the system. Since the system won't
> be hammered during the vacuum, it's ok to check more databases
> immediately after finishing vacuuming on one.
>

This is basically what Itagaki's patch does.

> Does anyone have any info on how much load there actually is when
> checking databases to see if they need vacuuming?
>

I haven't.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Larry Rosenman 2006-08-17 17:34:29 Re: Autovacuum on by default?
Previous Message Alvaro Herrera 2006-08-17 17:31:29 Re: Autovacuum on by default?

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-08-17 17:35:13 Re: [HACKERS] selecting large result sets in psql using
Previous Message Tom Lane 2006-08-17 17:28:57 Re: [HACKERS] selecting large result sets in psql using cursors