Re: [PERFORM] Group commit and commit delay/siblings

2010-12-08 Thread Simon Riggs
On Mon, 2010-12-06 at 23:52 -0500, Greg Smith wrote: > Jignesh Shah wrote: > > On Tue, Dec 7, 2010 at 1:55 AM, Tom Lane wrote: > > > >> I could have sworn we'd refactored that to something like > >>bool ThereAreAtLeastNActiveBackends(int n) > >> which could drop out of the loop as soon

Re: [PERFORM] Group commit and commit delay/siblings

2010-12-06 Thread Greg Smith
Jignesh Shah wrote: On Tue, Dec 7, 2010 at 1:55 AM, Tom Lane wrote: I could have sworn we'd refactored that to something like bool ThereAreAtLeastNActiveBackends(int n) which could drop out of the loop as soon as it'd established what we really need to know...I'd suggest that we just

Re: [PERFORM] Group commit and commit delay/siblings

2010-12-06 Thread Jignesh Shah
On Tue, Dec 7, 2010 at 1:55 AM, Tom Lane wrote: > Greg Smith writes: >> And the expensive part of the overhead beyond the delay itself is >> CountActiveBackends(), which iterates over the entire procArray >> structure. > > I could have sworn we'd refactored that to something like >        bool Th

Re: [PERFORM] Group commit and commit delay/siblings

2010-12-06 Thread Tom Lane
Greg Smith writes: > And the expensive part of the overhead beyond the delay itself is > CountActiveBackends(), which iterates over the entire procArray > structure. I could have sworn we'd refactored that to something like bool ThereAreAtLeastNActiveBackends(int n) which could drop out

Re: [PERFORM] Group commit and commit delay/siblings

2010-12-05 Thread Jignesh Shah
On Mon, Dec 6, 2010 at 12:35 PM, Greg Smith wrote: > Jignesh Shah wrote: >> >> The commit_siblings = 5 basically checks that it sleeps only when that >> many backends are active. This I think is a very expensive check and I >> would rather make commit_siblings=0 (which the current code does not >>

Re: [PERFORM] Group commit and commit delay/siblings

2010-12-05 Thread Greg Smith
Jignesh Shah wrote: The commit_siblings = 5 basically checks that it sleeps only when that many backends are active. This I think is a very expensive check and I would rather make commit_siblings=0 (which the current code does not support.. it only supports minimum of 1) I just posted a message

Re: [PERFORM] Group commit and commit delay/siblings

2010-12-05 Thread Jignesh Shah
On Mon, Dec 6, 2010 at 10:47 AM, Rob Wultsch wrote: > On Sun, Dec 5, 2010 at 7:30 PM, Jignesh Shah wrote: >> The commit_siblings = 5 basically checks that it sleeps only when that >> many backends are active. This I think is a very expensive check and I >> would rather make commit_siblings=0 (whi

Re: [PERFORM] Group commit and commit delay/siblings

2010-12-05 Thread Rob Wultsch
On Sun, Dec 5, 2010 at 7:30 PM, Jignesh Shah wrote: > The commit_siblings = 5 basically checks that it sleeps only when that > many backends are active. This I think is a very expensive check and I > would rather make commit_siblings=0 (which the current code does not > support.. it only supports

Re: [PERFORM] Group commit and commit delay/siblings

2010-12-05 Thread Jignesh Shah
On Mon, Dec 6, 2010 at 4:40 AM, Rob Wultsch wrote: > Manual: > http://www.postgresql.org/docs/9.0/static/runtime-config-wal.html#RUNTIME-CONFIG-WAL-SETTINGS > Recent discussion: > http://www.facebook.com/notes/mysql-at-facebook/group-commit-in-postgresql/465781235932 > > It is my understanding th