Обсуждение: autovacuum_naptime seems to take minutes for seconds

Поиск
Список
Период
Сортировка

autovacuum_naptime seems to take minutes for seconds

От
Claudio Eichenberger
Дата:
Hello,

Concerns: 8.4.2

I cannot test it on other systems than FreeBSD so I don't know whether it's just FreeBSD related.

The parameter autovacuum_naptime seems to take minutes for seconds.

On a completely idle system, no db access, with the default autovacuum_naptime=1min configuration I get:

gamma# iostat -w1 ar1
      tty             ar1             cpu
 tin tout  KB/t tps  MB/s  us ni sy in id
   1  234 88.35  10  0.87   0  0  0  0 99
   1  129 125.24  29  3.54   0  0  0  0 99
   0   44 125.71  14  1.72   0  0  0  0 99
   0   44 121.47  30  3.55   0  0  1  0 99
   0   44 125.71  14  1.72   1  0  0  0 99
   0   44 125.24  29  3.54   0  0  1  0 99
   0   44 124.69  29  3.53   0  0  1  0 99
   0   44 126.29  28  3.45   0  0  0  0 100
   0   45 118.13  15  1.73   1  0  0  0 99
   0   44 121.47  30  3.55   1  0  1  0 98
   0   44 43.65 102  4.34   0  0  1  0 99
   0   43 125.24  29  3.54   0  0  1  0 99
   0   44 125.71  14  1.72   0  0  0  0 99
   0   44 117.29  31  3.55   0  0  1  0 99
   6   44 124.69  29  3.53   0  0  0  0 100
  31   45 125.71  14  1.72   0  0  0  0 99

with autovacuum_naptime=5min

gamma# iostat -w1 ar1
      tty             ar1             cpu
 tin tout  KB/t tps  MB/s  us ni sy in id
   1  231 88.42  10  0.87   0  0  0  0 99
   1  129 117.94  31  3.56   0  0  1  0 99
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44 119.20  30  3.49   0  0  0  0 99
   0   44  0.00   0  0.00   0  0  0  0 99
   0   43  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44 117.94  31  3.57   0  0  1  0 99
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44 119.20  30  3.49   0  0  1  0 99
   0   44  0.00   0  0.00   0  0  0  0 100

with autovacuum_naptime=60min I get the default expected result of a minute:

gamma# iostat -w1 ar1
      tty             ar1             cpu
 tin tout  KB/t tps  MB/s  us ni sy in id
   1  229 88.42  10  0.87   0  0  0  0 99
   1  129  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  2.00   2  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  4.00   1  0.00   0  0  0  0 100
   0   44 16.00   1  0.02   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44 16.00  13  0.20   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  2.00   1  0.00   0  0  0  0 100
   0   44  7.43   7  0.05   0  0  0  0 99
   0   43  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
      tty             ar1             cpu
 tin tout  KB/t tps  MB/s  us ni sy in id
   0   44  0.00   0  0.00   0  0  0  0 100
   0  130  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44 124.69  29  3.53   0  0  1  0 99
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
      tty             ar1             cpu
 tin tout  KB/t tps  MB/s  us ni sy in id
   0   44 16.00  11  0.17   0  0  0  0 100
   0  130  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44 20.75   8  0.16   0  0  1  0 99
   0   43  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100
   0   44  0.00   0  0.00   0  0  0  0 100

Ragards

Claudio
--
Tel +41 21 67 17 111
Mob +41 79 34 72 100
Claudio@yourshop.com
Http://YourShop.com/


    "Come to me all who are weary and burdened
        and I will give you rest" -- Jesus Christ




Re: autovacuum_naptime seems to take minutes for seconds

От
Tom Lane
Дата:
Claudio Eichenberger <cei@yourshop.com> writes:
> The parameter autovacuum_naptime seems to take minutes for seconds.

How many databases in your installation?

autovacuum_naptime is the target cycle time for any one database.
If you have N databases then the time between launching autovacuum
workers will be autovacuum_naptime / N.

            regards, tom lane

Re: autovacuum_naptime seems to take minutes for seconds

От
Claudio Eichenberger
Дата:
Tom

Hello,

55 databases which made me believe minutes correspond to seconds!

Many thanks for your explanation

Regards

Claudio



On 2010-01-13 11:08:35, Tom Lane wrote:
> Claudio Eichenberger <cei@yourshop.com> writes:
> > The parameter autovacuum_naptime seems to take minutes for seconds.
>
> How many databases in your installation?
>
> autovacuum_naptime is the target cycle time for any one database.
> If you have N databases then the time between launching autovacuum
> workers will be autovacuum_naptime / N.
>
>             regards, tom lane
>

--
Tel +41 21 67 17 111
Mob +41 79 34 72 100
Claudio@yourshop.com
Http://YourShop.com/


    "Come to me all who are weary and burdened
        and I will give you rest" -- Jesus Christ