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

From Darcy Buskermolen
Subject Re: autovacuum launcher eating too much CPU
Date
Msg-id 200709140844.09476.darcyb@commandprompt.com
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
On September 14, 2007 06:36 am, Alvaro Herrera wrote:
> 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.)
Ok that looks much better, after running it for 8ish hours I'm not seeing any 
of the previous footprint growth.

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

This is looking much better now too, it's brought the AVL down to near 0% CPU 
usage.  


>
> 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.

-- 
Darcy Buskermolen
Command Prompt, Inc.
+1.503.667.4564 X 102
http://www.commandprompt.com/
PostgreSQL solutions since 1997


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_dump and insert multi-rows option
Next
From: "Don Walker"
Date:
Subject: Use of global and static variables in shared libraries