Re: Should we cacheline align PGXACT?

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: David Steele <david(at)pgmasters(dot)net>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Bernd Helmle <mailings(at)oopsware(dot)de>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Should we cacheline align PGXACT?
Date: 2017-04-04 12:55:29
Message-ID: CAPpHfdvLc9te+W=C-NO7+j1pYzwT8R-pkWv7Tp8=pdjF+z+SEg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 3, 2017 at 9:58 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:

> On 2017-03-25 19:35:35 +0300, Alexander Korotkov wrote:
> > On Wed, Mar 22, 2017 at 12:23 AM, David Steele <david(at)pgmasters(dot)net>
> wrote:
> >
> > > Hi Alexander
> > >
> > > On 3/10/17 8:08 AM, Alexander Korotkov wrote:
> > >
> > > Results look good for me. Idea of committing both of patches looks
> > >> attractive.
> > >> We have pretty much acceleration for read-only case and small
> > >> acceleration for read-write case.
> > >> I'll run benchmark on 72-cores machine as well.
> > >>
> > >
> > > Have you had a chance to run those tests yet?
> > >
> >
> > I discovered an interesting issue.
> > I found that ccce90b3 (which was reverted) gives almost same effect as
> > PGXACT alignment on read-only test on 72-cores machine.
>
> That's possibly because it changes alignment?
>

Probably, that needs to be checked.

> That shouldn't be related to the functionality of ccce90b3 itself, because
> > read-only test don't do anything with clog. And that appears to be true.
> > Padding of PGPROC gives same positive effect as ccce90b3. Padding patch
> > (pgproc-pad.patch) is attached. It's curious that padding changes size
> of
> > PGPROC from 816 bytes to 848 bytes. So, size of PGPROC remains 16-byte
> > aligned. So, probably effect is related to distance between PGPROC
> > members...
> >
> > See comparison of 16-bytes alignment of PGXACT + reduce PGXACT access vs.
> > padding of PGPROC.
>
> My earlier testing had showed that padding everything is the best
> approach :/
>
>
> I'm inclined to push this to the next CF, it seems we need a lot more
> benchmarking here.
>

No objections.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-04-04 12:56:27 Re: PDF build is broken
Previous Message Peter Eisentraut 2017-04-04 12:54:13 Re: Unable to build doc on latest head