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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Autovacuum launcher doesn't notice death of postmaster immediately
Дата
Msg-id 20070608231940.GE23222@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Autovacuum launcher doesn't notice death of postmaster immediately  ("Matthew T. O'Connor" <matthew@zeut.net>)
Ответы Re: Autovacuum launcher doesn't notice death of postmaster immediately  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-hackers
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. 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.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Patch review process; Warning to patch submitters
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: Using the GPU