Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-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

pgsql-hackers by date

Next:From: Dimitri FontaineDate: 2010-12-08 22:07:27
Subject: Re: Review: Extensions Patch
Previous:From: David E. WheelerDate: 2010-12-08 21:54:34
Subject: Re: Review: Extensions Patch

pgsql-committers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group