Setting vacuum_freeze_min_age really low

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance




[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux