Re: Wait free LW_SHARED acquisition - v0.9

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Wait free LW_SHARED acquisition - v0.9
Date: 2014-10-11 14:41:52
Message-ID: 20141011144152.GD18020@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ali Akbar 2014-10-11 14:57:38 Function array_agg(array)
Previous Message Alvaro Herrera 2014-10-11 13:44:39 split builtins.h to quote.h