Re: autovacuum launcher eating too much CPU - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: autovacuum launcher eating too much CPU
Date
Msg-id 20070914133658.GA6098@alvh.no-ip.org
Whole thread Raw
In response to Re: autovacuum launcher eating too much CPU  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: autovacuum launcher eating too much CPU
List pgsql-hackers
Alvaro Herrera wrote:
> Darcy Buskermolen wrote:
> > On Thursday 13 September 2007 09:16:52 Alvaro Herrera wrote:
> > > Hi,
> > >
> > > Darcy Buskermolen noticed that when one has many databases, the autovac
> > > launcher starts eating too much CPU.
> >
> > Don't forget the memory leak as well.  after 3 or 4 days of running I end up
> > with a 2GB+ AVL..
>
> Huh, sorry for not letting you know, I already fixed that :-)  (Please
> grab the latest CVS HEAD and confirm.)

Darcy, please also apply the following patch and see if it reduces the
CPU consumption to a reasonable level.

What this patch does is keep the pgstats data for 1 second in the
autovac launcher.  The idea is to avoid reading the data too frequently.
I coded it so that it doesn't affect the worker, because it would make
the table recheck code less effective.

--
Alvaro Herrera                 http://www.amazon.com/gp/registry/CTMLCN8V17R4
"MySQL is a toy compared to PostgreSQL."             (Randal L. Schwartz)
      (http://archives.postgresql.org/pgsql-general/2005-07/msg00517.php)

Attachment

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] ascii() for utf8
Next
From: Alvaro Herrera
Date:
Subject: away for extended weekend