Re: DB is slow until DB is reloaded

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: Madison Kelly <linux(at)alteeve(dot)com>
Cc: Rosser Schwarz <rosser(dot)schwarz(at)gmail(dot)com>, Brad Nicholson <bnichols(at)ca(dot)afilias(dot)info>, Gary Doades <gpd(at)gpdnet(dot)co(dot)uk>, pgsql-performance(at)postgresql(dot)org
Subject: Re: DB is slow until DB is reloaded
Date: 2010-01-05 01:10:47
Message-ID: 4B429197.7010801@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Madison Kelly wrote:
>
> You are right, autovacuum is not running after all. From your comment,
> I am wondering if you'd recommend I turn it on or not?...
>
>
I see you are considering an upgrade but FWIW on your 8.1 instance, my
remaining 8.1 server has been running for years with it on. Read up on
it at:
http://www.postgresql.org/docs/8.1/static/maintenance.html#AUTOVACUUM

Basically you need to turn on some stats stuff so autovacuum can
determine when to run (in postgresql.conf):
stats_start_collector = on
stats_row_level = on

And you need to enable autovacuum (in postgresql.conf):
autovacuum = on
autovacuum_naptime = 300 # time between autovacuum runs,
in secs

Then you can tune it if you need to but at least it will be looking for
things that are vacuumworthy every 5 minutes.

Cheers,
Steve

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Robert Haas 2010-01-05 02:09:00 Re: forced sequential scan when condition has current_user
Previous Message Madison Kelly 2010-01-05 00:36:03 Re: DB is slow until DB is reloaded