Re: autovacuum launcher eating too much CPU

From: Darcy Buskermolen <darcyb(at)commandprompt(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: autovacuum launcher eating too much CPU
Date: 2007-09-14 15:44:09
Message-ID: 200709140844.09476.darcyb@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Markus Schiltknecht 2007-09-14 15:58:20 Re: terms for database replication: synchronous vs eager
Previous Message Don Walker 2007-09-14 15:26:03 Use of global and static variables in shared libraries