Re: [HACKERS] Minor optimisation of XLogInsert()

2011-11-16 Thread Robert Haas
On Tue, Nov 15, 2011 at 6:24 AM, Simon Riggs si...@2ndquadrant.com 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

Re: [HACKERS] Minor optimisation of XLogInsert()

2011-11-16 Thread Robert Haas
On Wed, Nov 16, 2011 at 9:33 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Nov 15, 2011 at 6:24 AM, Simon Riggs si...@2ndquadrant.com wrote: Patch adds cacheline padding around parts of XLogCtl. Idea from way back, but never got performance tested in a situation where WALInsertLock was

Re: [HACKERS] Minor optimisation of XLogInsert()

2011-11-16 Thread Simon Riggs
On Wed, Nov 16, 2011 at 8:42 PM, Robert Haas robertmh...@gmail.com 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

Re: [HACKERS] Minor optimisation of XLogInsert()

2011-11-16 Thread Robert Haas
On Wed, Nov 16, 2011 at 5:15 PM, Simon Riggs si...@2ndquadrant.com wrote: On Wed, Nov 16, 2011 at 8:42 PM, Robert Haas robertmh...@gmail.com 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

Re: [HACKERS] Minor optimisation of XLogInsert()

2011-11-16 Thread Tom Lane
Robert Haas robertmh...@gmail.com 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

Re: [HACKERS] Minor optimisation of XLogInsert()

2011-11-16 Thread Robert Haas
On Wed, Nov 16, 2011 at 11:11 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com 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