pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Henry Francisco Garcia Cortez <garcortez@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: autovacuum_analyze_scale_factor and autovacuum_analyze_scale_factor
Date: Fri, 08 Jan 2021 10:04:23 +0100
Message-ID: <277279e0a7b59a5ac942976aaaf85e1d74d7034e.camel@cybertec.at> (raw)
In-Reply-To: <CAJP2v3Gg56td=O+GyAf7Vj758b=hkGMzUoGPw0kvZtExvxB_QA@mail.gmail.com>
References: <CAJP2v3G0S4pRGKDb6vNZuiU+N6TFhXXruLCQeTyJEBAV42CJ3g@mail.gmail.com>
	<38c4371df337331ce4c8d97c3ea1ecce30fc4988.camel@cybertec.at>
	<CAJP2v3Gg56td=O+GyAf7Vj758b=hkGMzUoGPw0kvZtExvxB_QA@mail.gmail.com>

On Thu, 2021-01-07 at 10:56 -0600, Henry Francisco Garcia Cortez wrote:
> El mié, 6 ene 2021 a las 19:53, Laurenz Albe (<laurenz.albe@cybertec.at>) escribió:
> 
> > On Wed, 2021-01-06 at 11:05 -0600, Henry Francisco Garcia Cortez wrote:
> > > I have a question why settings default postgresql has autovacuum_vacuum_scale_factor in 0.2
> > >  is higher than autovacuum_analyze_scale_factor 0.1, so If want to tune these parameters,
> > >  I always must leave autovacuum_vacuum_scale_factor higher than autovacuum_analyze_scale_factor,
> > >  for instance I wanted to leave autovacuum_vacuum_scale_factor in 0.002 and
> > >  autovacuum_analyze_scale_factor in 0.001
> > 
> > The autovacuum scale factor has been twice the autoanalyze scale factor since the
> > beginning.  You could search the archives from around 2004 for a reason, but I'd
> > say it might have to do with the fact that ANALYZE is much cheaper than VACUUM,
> > and that the impact of bad statistics is usually more severe than the impact of
> > some dead tuples.
> > 
> > But there is no need for you to keep it that way when you change the parameters.
> > For example, if you want to speed up index only scans, you may want to set
> > "autovacuum_vacuum_scale_factor" to something like 0.01, but leave
> > "autovacuum_analyze_scale_factor" at the default value.
> > 
> > The values that you suggest seem much too low - that will result in autovacuum
> > running all the time.
>
> Thanks for the information Laurenz Albe I have another question what will be effect
> if there are autovacuums running all the time, what will be settings you could suggest me for
> autovacuum_vacuum_scale_factor and autovacuum_analyze_scale_factor

Unless there are indications to choose different values, stick with the default
values of 0.1 and 0.2.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (4+ messages)

Message-ID: <277279e0a7b59a5ac942976aaaf85e1d74d7034e.camel@cybertec.at>
Permalink:  ../277279e0a7b59a5ac942976aaaf85e1d74d7034e.camel@cybertec.at/
Also on:    postgresql.org/message-id/277279e0a7b59a5ac942976aaaf85e1d74d7034e.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, garcortez@gmail.com
  Subject: Re: autovacuum_analyze_scale_factor and autovacuum_analyze_scale_factor
  In-Reply-To: <277279e0a7b59a5ac942976aaaf85e1d74d7034e.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox