Re: Autovacuum launcher doesn't notice death of postmaster immediately

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>, "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>, Michael Paesold <mpaesold(at)gmx(dot)at>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Hammond <andrew(dot)george(dot)hammond(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Autovacuum launcher doesn't notice death of postmaster immediately
Date: 2007-06-09 05:49:00
Message-ID: 466A3F4C.5040409@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Alvaro Herrera wrote:
> Matthew T. O'Connor escribió:
>
>> Ok, but I think the question posed is that in say a virtual hosting
>> environment there might be say 1,000 databases in the cluster.

That is uhmmm insane... 1000 databases?

Joshua D. Drake

Am I
>> still going to have to wait a long time for my database to get vacuumed?
>> I don't think this has changed much no?
>
> Depends on how much time it takes to vacuum the other 999 databases.
> The default max workers is 3.
>
>> (If default naptime is 1 minute, then autovacuum won't even look at a
>> given database but once every 1,000 minutes (16.67 hours) assuming that
>> there isn't enough work to keep all the workers busy.)
>
> The naptime is per database. Which means if you have 1000 databases and
> a naptime of 60 seconds, the launcher is going to wake up every 100
> milliseconds to check things up. (This results from 60000 / 1000 = 60
> ms, but there is a minimum of 100 ms just to keep things sane).
>
> If there are 3 workers and each of the 1000 databases in average takes
> 10 seconds to vacuum, there will be around 3000 seconds between autovac
> runs of your database assuming my math is right.
>
> I hope those 1000 databases you put in your shared hosting are not very
> big.
>

--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dann Corbit 2007-06-09 05:50:12 Re: Issues with factorial operator
Previous Message Joshua D. Drake 2007-06-09 05:42:44 Re: Command tags in create/drop scripts

Browse pgsql-patches by date

  From Date Subject
Next Message Dann Corbit 2007-06-09 05:55:52 Re: Autovacuum launcher doesn't notice death of postmaster immediately
Previous Message Jon Colverson 2007-06-08 23:28:18 Re: Patch for recent PITR bug