Re: FSM search modes

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: FSM search modes
Дата
Msg-id 4AC4E1DD020000250002B586@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: FSM search modes  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: FSM search modes  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: FSM search modes  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote: 
> (Hm, so we might want to make the probability depend on
> max_connections?)
Without doing rigorous math on it, I'd guess that to prevent
contention among n connections you'd want the probably of resetting
the sweep to be about 1 / (n * 2).  That would mean you'd advance to
the nth page about 60.6% of the time without resetting the sweep.  For
less contention, 1 / (n * 4) would let you get to the nth page about
77.9% of the time.
> Maybe what we want is some bias against inserting in the last half
> or quarter of the table, or some such rule, rather than necessarily
> heading for the start of the relation.
I think it would make sense to just start using this once you get into
the last half or quarter of the free pages.  If you go with the last
quarter, then you might want to use a higher probability than I
suggested above, although that would tend to leave you with contention
when all the free space was in the last quarter.  I'd be inclined to
use something like the above probability and start using it at 50%.
-Kevin


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: FSM search modes
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: FSM search modes