Re: autovacuum launcher eating too much CPU

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Darcy Buskermolen <darcyb(at)commandprompt(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: autovacuum launcher eating too much CPU
Date: 2007-09-14 13:36:58
Message-ID: 20070914133658.GA6098@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
autovac-throttle-pgstatread.patch text/x-diff 4.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2007-09-14 13:43:34 away for extended weekend
Previous Message Bruce Momjian 2007-09-14 13:22:58 Re: [GENERAL] ascii() for utf8