Setting vacuum_freeze_min_age really low - Mailing list pgsql-performance

From Josh Berkus
Subject Setting vacuum_freeze_min_age really low
Date
Msg-id 5150B415.9060907@agliodbs.com
Whole thread Raw
Responses Re: Setting vacuum_freeze_min_age really low  (Robert Haas <robertmhaas@gmail.com>)
Re: Setting vacuum_freeze_min_age really low  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-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


pgsql-performance by date:

Previous
From: Greg Jaskiewicz
Date:
Subject: Proof of concept: Evolving postgresql.conf using genetic algorithm
Next
From: Josh Berkus
Date:
Subject: Re: 9.2.3 upgrade reduced pgbench performance by 60%