Re: pg 8.1.2 performance issue

From: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
To: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
Cc: chris smith <dmagick(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: pg 8.1.2 performance issue
Date: 2006-03-26 16:27:33
Message-ID: 4426C0F5.5080100@zeut.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>>>> The table has 6800 rows over 18000 pages, and is getting a
>>>> minimum of many tens of thousands of updates per day with
>>>> queries like this:
>>> If you're updating that much, how often are you running
>>> 'analyze'? Are you running autovacuum? How often?
>> I count on the built-in autovacuum to do do analyzes (per
>> 8.1.2 docs). I'm running autovacuum with the following
>> non-default parameters:
>>
>> autovacuum = on
>> autovacuum_naptime = 600 # 10 minutes
>
> I also have these non-default settings:
>
> autovacuum_vacuum_cost_delay = 500
> autovacuum_vacuum_cost_limit = 200

Not totally sure, but it sounds like the table isn't getting vacuumed
often enough. To help, you might reduce the naptime from 10 minutes to
5. But I think the cost_delay settings might be the larger problem. If
I remember correctly, even small values here tend to greatly increase
the time it takes vacuum commands to complete, so you might try backing
down those settings. Can you tell from the log files how often
autovacuum is actually taking actions, or how long those actions are taking?

Does anyone out there have any empirical data on good
autovacuum_*_cost_* settings? I would be curious to hear about them.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Hoksza 2006-03-26 18:30:44 ambulkdelete
Previous Message Tom Lane 2006-03-26 16:16:24 Re: pg 8.1.2 performance issue