Re: Problems with autovacuum

From: Tom Lane
Subject: Re: Problems with autovacuum
Date: ,
Msg-id: 6357.1243277706@sss.pgh.pa.us
(view: Whole thread, Raw)
In response to: Re: Problems with autovacuum  (Łukasz Jagiełło)
Responses: Re: Problems with autovacuum  (Łukasz Jagiełło)
Re: Problems with autovacuum  (Alvaro Herrera)
List: pgsql-performance

Tree view

Problems with autovacuum  (Łukasz Jagiełło, )
 Re: Problems with autovacuum  (Scott Marlowe, )
  Re: Problems with autovacuum  (Grzegorz Jaśkiewicz, )
   Re: Problems with autovacuum  (Scott Marlowe, )
   Re: Problems with autovacuum  (Łukasz Jagiełło, )
    Re: Problems with autovacuum  (Tom Lane, )
     Re: Problems with autovacuum  (Łukasz Jagiełło, )
     Re: Problems with autovacuum  (Alvaro Herrera, )
      Re: Problems with autovacuum  (Tom Lane, )
       Re: Problems with autovacuum  (Alvaro Herrera, )
        Re: Problems with autovacuum  (Tom Lane, )
         Re: Problems with autovacuum  (Alvaro Herrera, )
          Re: Problems with autovacuum  (Tom Lane, )
           Re: Problems with autovacuum  (Alvaro Herrera, )
            Re: Problems with autovacuum  (Tom Lane, )
             Re: Problems with autovacuum  (Scott Marlowe, )
             Re: Problems with autovacuum  (Alvaro Herrera, )
              Re: Problems with autovacuum  (Tom Lane, )
               Re: Problems with autovacuum  (Alvaro Herrera, )
                Re: Problems with autovacuum  (Alvaro Herrera, )
                Re: Problems with autovacuum  (Tom Lane, )
       Re: Problems with autovacuum  (Łukasz Jagiełło, )
  Re: Problems with autovacuum  (Łukasz Jagiełło, )
   Re: Problems with autovacuum  (Grzegorz Jaśkiewicz, )

=?UTF-8?B?xYF1a2FzeiBKYWdpZcWCxYJv?= <> writes:
> That autovacuum working hole time, shoudn't be run only when db needs ?

With 2000 databases to cycle through, autovac is going to be spending
quite a lot of time just finding out whether it needs to do anything.
I believe the interpretation of autovacuum_naptime is that it should
examine each database that often, ie once a minute by default.  So
it's got more than 30 databases per second to look through.

Maybe it would make more sense to have one database (or at least,
many fewer databases) and 2000 schemas within it?

If you really want to stick with this layout, you're going to have to
increase autovacuum_naptime.

            regards, tom lane


pgsql-performance by date:

From: Grzegorz Jaśkiewicz
Date:
Subject: Re: Problems with autovacuum
From: "Kenny Gorman"
Date:
Subject: Re: Putting tables or indexes in SSD or RAM: avoiding double caching?