pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Increase the default vacuum_cost_limit from 200 to 2000
Date: Wed, 06 Mar 2019 14:10:35 +0000
Message-ID: <E1h1XFj-0006Rp-OK@gemulon.postgresql.org> (raw)

Increase the default vacuum_cost_limit from 200 to 2000

The original 200 default value was set back in f425b605f4e when the cost
delay settings were first added.  Hardware has improved quite a bit since
then and we've also made improvements such as sorting buffers during
checkpoints (9cd00c457e6) which should result in less random writes.

This low default value was reportedly causing problems with badly
configured servers and in the absence of a native method to remove
excessive bloat from tables without incurring an AccessExclusiveLock, this
often made cleaning up the damage caused by badly configured auto-vacuums
difficult.

It seems more likely that someone will notice that auto-vacuum is running
too quickly than too slowly, so let's go all out and multiple the default
value for the setting by 10.  With the default vacuum_cost_page_dirty and
autovacuum_vacuum_cost_delay (assuming a page size of 8192 bytes), this
allows autovacuum a theoretical maximum dirty write rate of around 39MB/s
instead of just 3.9MB/s.

Author: David Rowley

Discussion: https://postgr.es/m/CAKJS1f_YbXC2qTMPyCbmsPiKvZYwpuQNQMohiRXLj1r=8_rYvw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bd09503e633b8077822bb4daf91625b71ac16253

Modified Files
--------------
doc/src/sgml/config.sgml                      | 2 +-
src/backend/utils/init/globals.c              | 2 +-
src/backend/utils/misc/guc.c                  | 2 +-
src/backend/utils/misc/postgresql.conf.sample | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)



Message-ID: <E1h1XFj-0006Rp-OK@gemulon.postgresql.org>
Permalink:  ../E1h1XFj-0006Rp-OK@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1h1XFj-0006Rp-OK@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andrew@dunslane.net
  Subject: Re: pgsql: Increase the default vacuum_cost_limit from 200 to 2000
  In-Reply-To: <E1h1XFj-0006Rp-OK@gemulon.postgresql.org>
  References: <E1h1XFj-0006Rp-OK@gemulon.postgresql.org>

* 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