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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Optimize commit_siblings in two ways to improve group commit.
Date: 2010-12-08 21:57:33
Message-ID: 21815.1291845453@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Greg Smith <greg(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Greg Smith 2010-12-08 22:43:29 Re: [COMMITTERS] pgsql: Optimize commit_siblings in two ways to improve group commit.
Previous Message Greg Smith 2010-12-08 20:58:25 Re: [COMMITTERS] pgsql: Optimize commit_siblings in two ways to improve group commit.

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2010-12-08 22:07:27 Re: Review: Extensions Patch
Previous Message David E. Wheeler 2010-12-08 21:54:34 Re: Review: Extensions Patch