Re: Autovacuum Question

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Mark Liberman <mliberman(at)mixedsignals(dot)com>
Cc: Chris Hoover <revoohc(at)gmail(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Autovacuum Question
Date: 2006-05-16 18:31:01
Message-ID: 20060516183101.GJ26212@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, May 16, 2006 at 10:30:26AM -0700, Mark Liberman wrote:
> >Does this mean that each run of autovacuum will vacuum/analyze all tables
> >that need work in the database that autovacuum is looking at?
>
> Yes, it will do all tables that satisfy the criteria.
>
> >Also, with over 200 databases, does this mean that a database will only get
> >checked once about every 3.5 hours, or does autovacuum run on the database
> >that needs the vacuuming the most?
>
> If, you have it set to 60 seconds, then yes. It hits one db each minute. Actually, to be more clear, it sleeps 1 minute between each check. So, if, on average, it takes 60 seconds to perform the necessary vacuum/analyzes, then it there will be, on average, 2 minutes between each db, or 400 minutes to get through all 200 dbs.

The sleep time is so that the daemon doesn't just sit there hammering
the database, checking to see if it needs to vacuum anything. If you've
got 200 tables in one cluster, you should probably drop the sleep time
way down; probably closer to 10 or even 1.

Ideally, every time the daemon runs, there would be exactly one database
that needed vacuuming.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jim C. Nasby 2006-05-16 18:33:13 Re: How can i hide the unnecessary schemas from developers
Previous Message Jeff Frost 2006-05-16 18:22:27 Re: does wal archiving block the current client connection?