Re: [HACKERS] Minor optimisation of XLogInsert()

2011-11-16 Thread Robert Haas
On Wed, Nov 16, 2011 at 11:11 PM, Tom Lane wrote: > Robert Haas writes: >> (I wonder if we shouldn't just align every shared memory allocation to >> 64 or 128 bytes.  It wouldn't waste much memory and it would make us >> much more resistant to performance changes caused by minor >> modifications

Re: [HACKERS] Minor optimisation of XLogInsert()

2011-11-16 Thread Tom Lane
Robert Haas writes: > (I wonder if we shouldn't just align every shared memory allocation to > 64 or 128 bytes. It wouldn't waste much memory and it would make us > much more resistant to performance changes caused by minor > modifications to the shared memory layout.) I could get behind this id

Re: [HACKERS] Minor optimisation of XLogInsert()

2011-11-16 Thread Robert Haas
On Wed, Nov 16, 2011 at 5:15 PM, Simon Riggs wrote: > On Wed, Nov 16, 2011 at 8:42 PM, Robert Haas wrote: >> Taking the median of those five results, the patch seems to have sped >> things up by 0.3%.  At 80 clients: > > Thanks for doing that. Even if we fix it as you suggest it seems to > indica

Re: [HACKERS] Minor optimisation of XLogInsert()

2011-11-16 Thread Simon Riggs
On Wed, Nov 16, 2011 at 8:42 PM, Robert Haas wrote: > Taking the median of those five results, the patch seems to have sped > things up by 0.3%.  At 80 clients: Thanks for doing that. Even if we fix it as you suggest it seems to indicate that the WALInsertLock contention is real rather than fals

Re: [HACKERS] Minor optimisation of XLogInsert()

2011-11-16 Thread Robert Haas
On Wed, Nov 16, 2011 at 9:33 AM, Robert Haas wrote: > On Tue, Nov 15, 2011 at 6:24 AM, Simon Riggs wrote: >> Patch adds cacheline padding around parts of XLogCtl. >> >> Idea from way back, but never got performance tested in a situation >> where WALInsertLock was the bottleneck. >> >> So this is

Re: [HACKERS] Minor optimisation of XLogInsert()

2011-11-16 Thread Robert Haas
On Tue, Nov 15, 2011 at 6:24 AM, Simon Riggs wrote: > Patch adds cacheline padding around parts of XLogCtl. > > Idea from way back, but never got performance tested in a situation > where WALInsertLock was the bottleneck. > > So this is speculative, in need of testing to investigate value. I kick

[HACKERS] Minor optimisation of XLogInsert()

2011-11-15 Thread Simon Riggs
Patch adds cacheline padding around parts of XLogCtl. Idea from way back, but never got performance tested in a situation where WALInsertLock was the bottleneck. So this is speculative, in need of testing to investigate value. --  Simon Riggs   http://www.2ndQuadrant.com/  Postg