Re: Move PinBuffer and UnpinBuffer to atomics

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, YUriy Zhuravlev <u(dot)zhuravlev(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Move PinBuffer and UnpinBuffer to atomics
Date: 2016-02-29 11:48:25
Message-ID: CAPpHfduy7+O934cVwa98z02r3pae4909zWpgKVBFGu=Cm+5RRg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Feb 27, 2016 at 2:44 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:

> On 2016-02-02 13:12:50 +0300, Alexander Korotkov wrote:
> > On Tue, Feb 2, 2016 at 12:43 AM, Andres Freund <andres(at)anarazel(dot)de>
> wrote:
> >
> > > On 2016-02-01 13:06:57 +0300, Alexander Korotkov wrote:
> > > > On Mon, Feb 1, 2016 at 11:34 AM, Alexander Korotkov <
> > > > a(dot)korotkov(at)postgrespro(dot)ru> wrote:
> > > > >> Client Base Patch
> > > > >> 1 19744 19382
> > > > >> 8 125923 126395
> > > > >> 32 313931 333351
> > > > >> 64 387339 496830
> > > > >> 128 306412 350610
> > > > >>
> > > > >> Shared Buffer= 512MB
> > > > >> max_connections=150
> > > > >> Scale Factor=300
> > > > >>
> > > > >> ./pgbench -j$ -c$ -T300 -M prepared -S postgres
> > > > >>
> > > > >> Client Base Patch
> > > > >> 1 17169 16454
> > > > >> 8 108547 105559
> > > > >> 32 241619 262818
> > > > >> 64 206868 233606
> > > > >> 128 137084 217013
> > >
> > > So, there's a small regression on low client counts. That's worth
> > > addressing.
> > >
> >
> > Interesting. I'll try to reproduce it.
>
> Any progress here?
>

I didn't reproduce the regression. I had access to multicore machine but
didn't see either regression on low clients or improvements on high clients.
In the attached path spinlock delay was exposed in s_lock.h and used
in LockBufHdr().
Dilip, could you try this version of patch? Could you also run perf or
other profiler in the case of regression. It would be nice to compare
profiles with and without patch. We probably could find the cause of
regression.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
pinunpin-cas-3.patch application/octet-stream 82.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-02-29 11:54:07 Re: WIP: Access method extendability
Previous Message salvador fandino 2016-02-29 11:44:38 Compilation broken when OPTIMIZER_DEBUG is set