Re: Rules of Thumb for Autovaccum - Mailing list pgsql-general

From Ondrej Ivanič
Subject Re: Rules of Thumb for Autovaccum
Date
Msg-id CAM6mieLKsbBx6EJTBksdkm1pAng1Y3BuH25x46v24hTXRdB+iQ@mail.gmail.com
Whole thread Raw
In response to Rules of Thumb for Autovaccum  (Robert James <srobertjames@gmail.com>)
List pgsql-general
Hi,

On 16 February 2012 01:14, Robert James <srobertjames@gmail.com> wrote:
> What rules of thumb exist for:
> * How often a table needs to be vacuumed?
> * How often a table needs to be analyzed?
> * How to tune Autovacuum?

I prefer to use autovacuum daemon and sets thresholds on per table
basis i.e. sets reasonable defaults and then add few exceptions.
I keep *_threshold as is and change *_scale_factor and turn off cost
based vacuum/analyse (see other note about this). My lowest
scale_factor is 0.002 ie. 0.2% of table has to change (which
corresponds to ~8mil rows) to trigger analyse/vacuum.

autovacuum/analyse can produce significant I/O so you have two options:
- tune cost based settings in order to limit I/O used by this porocess
- turn off autovacuum daemon and schedule manual acuum/analyse in quiet period

--
Ondrej Ivanic
(ondrej.ivanic@gmail.com)

pgsql-general by date:

Previous
From: Stefan Keller
Date:
Subject: Re: [postgis-users] ST_AsJpeg
Next
From: Kiriakos Georgiou
Date:
Subject: order of evaluation of search arguments