From: Josh Berkus <josh@agliodbs.com>
To: postgres performance list <pgsql-performance@postgresql.org>
Subject: Setting vacuum_freeze_min_age really low
Date: Mon, 25 Mar 2013 13:31:17 -0700
Message-ID: <5150B415.9060907@agliodbs.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Folks,
In the past, setting vacuum_freeze_min_age (vfma) really low (say to
10000 or 50000) would have caused lots of extra writing work due to
dirtying extra pages for freezing. This has been our stated reason to
keep vfma high, despite the obvious advantage of freezing tuples while
they're still in the cache.
With the visibility map, though, vfma should only be dirtying pages
which vacuum is already visiting because there's dirty tuples on the
page. That is, pages which vacuum will probably dirty anyway, freezing
or not. (This is assuming one has applied the 9.2.3 update.)
Given that, it seems like the cost of lowering vfma *should* be
marginal. The only extra work done by a lower vfma should be:
1. extra cpu time to put in the froxenXIDs on vacuumed pages, and
2. dirtying the minority of pages which vacuum decided to scan, but not
write to.
The second point is the one where I'm not sure how to evaluate. How
likely, as of 9.2, is vacuum to visit a page and not dirty it? And are
there other costs I'm not thinking of?
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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-performance@postgresql.org
Cc: josh@agliodbs.com
Subject: Re: Setting vacuum_freeze_min_age really low
In-Reply-To: <5150B415.9060907@agliodbs.com>
* 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