Re: Wait free LW_SHARED acquisition - v0.9 - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Wait free LW_SHARED acquisition - v0.9
Date
Msg-id 20141011144152.GD18020@awork2.anarazel.de
Whole thread Raw
In response to Re: Wait free LW_SHARED acquisition - v0.9  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On 2014-10-11 15:10:45 +0200, Andres Freund wrote:
> Hi,
> 
> On 2014-10-11 07:26:57 +0530, Amit Kapila wrote:
> > On Sat, Oct 11, 2014 at 7:00 AM, Andres Freund <andres@2ndquadrant.com>
> > > And since
> > > your general performance numbers are a fair bit lower than what I see
> > > with, hopefully, the same code on the same machine...
> > 
> > You have reported numbers at 1000 scale factor and mine were
> > at 3000 scale factor, so I think the difference is expected.
> 
> The numbers for 3000 show pretty much the same:
> 
> SCALE        128        160        175
> HEAD        352113        339005        336491
> LW_SHARED    365874        347931        342528
> 
> Hm. I wonder if you're using pgbench without -M prepared? That'd about
> explain the difference.

Started a test for a run without -M prepared (i.e. -M simple):

SCALE        1    2    4    8    16    32      64      96      128     160     196
HEAD        7968    15132    31147    63395    123551    180436    242098    263625    249652    244240    232679
LW_SHARED    8268    15032    31267    63911    118943    180447    247067    269262    259165    247166    231292

This really doesn't look exciting to me.

scale 200, -M prepared:
SCALE        1    2    4    8    16    32      64      96      128     160     196
HEAD        13032    24712    50967    103801    201745    279226    380844    392623    379953    357206    361072
LW_SHARED    12997    25134    51119    102920    199597    282511    422424    460222    447662    436959    418519

My guess is that the primary benefit on systems with few sockets, like
this, is that with the new code there's far fewer problems with
processes sleeping (being scheduled out) while holding a spinlock.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: split builtins.h to quote.h
Next
From: Ali Akbar
Date:
Subject: Function array_agg(array)