Re: [COMMITTERS] pgsql: Optimize commit_siblings in two ways to improve group commit.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [COMMITTERS] pgsql: Optimize commit_siblings in two ways to improve group commit.
Дата
Msg-id 21815.1291845453@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Optimize commit_siblings in two ways to improve group commit.  (Greg Smith <greg@2ndquadrant.com>)
Ответы Re: [COMMITTERS] pgsql: Optimize commit_siblings in two ways to improve group commit.  (Greg Smith <greg@2ndquadrant.com>)
Список pgsql-hackers
Greg Smith <greg@2ndquadrant.com> writes:
> I then posted the patch and added it to the January CF.  Unbeknownst to 
> me until today, Simon had the same multi-year "this itches and I can't 
> make it stop" feel toward these parameters, and that's how it jumped the 
> standard process.

I think pretty much everybody who's looked at that code had the same
feeling.  If Simon hadn't taken it, I might have.

Jignesh's explanation of what the actual usefulness of the code is
finally made sense to me: the sleep calls effectively synchronize
multiple nearby commits to happen at the next scheduler clock tick,
and then whichever one grabs the WALWriteLock first does the work.
If you've got a high enough commit volume that this is likely to
be a win, then it's unclear that taking ProcArrayLock (even shared)
to check for guys who might commit shortly is a net win.  Moreover,
it's likely that that heuristic will exclude the last-to-arrive
process who otherwise could have participated in a group flush.

I'm not entirely convinced that zero commit_siblings is a better
default than small positive values, but it's certainly plausible.
        regards, tom lane


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

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Review: Extensions Patch
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Review: Extensions Patch