Setting vacuum_freeze_min_age really low

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Setting vacuum_freeze_min_age really low
Дата
Msg-id 5150B415.9060907@agliodbs.com
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: Greg Jaskiewicz
Дата:
Сообщение: Proof of concept: Evolving postgresql.conf using genetic algorithm
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: 9.2.3 upgrade reduced pgbench performance by 60%