Re: Re: Misaligned BufferDescriptors causing major performance problems on AMD - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Re: Misaligned BufferDescriptors causing major performance problems on AMD
Date
Msg-id 20140204122101.GI12016@awork2.anarazel.de
Whole thread Raw
In response to Re: Re: Misaligned BufferDescriptors causing major performance problems on AMD  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Re: Misaligned BufferDescriptors causing major performance problems on AMD
List pgsql-hackers
On 2014-02-04 00:38:19 +0100, Andres Freund wrote:
> > > A quick hack (attached) making BufferDescriptor 64byte aligned indeed
> > > restored performance across all max_connections settings. It's not
> > > surprising that a misaligned buffer descriptor causes problems -
> > > there'll be plenty of false sharing of the spinlocks otherwise. Curious
> > > that the the intel machine isn't hurt much by this.
> >
> > I think that is explained here:
> >
> > http://www.agner.org/optimize/blog/read.php?i=142&v=t
> >
> > With Sandy Bridge, "Misaligned memory operands [are] handled efficiently".
> 
> No, I don't think so. Those improvements afair refer to unaligned
> accesses as in accessing a 4 byte variable at address % 4 != 0.

So, Christian did some benchmarking on the intel machine, and his
results were also lower than mine, and I've since confirmed that it's
also possible to reproduce the alignment problems on the intel machine.

Which imo means fixing this got more important...

Greetings,

Andres Freund

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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: should we add a XLogRecPtr/LSN SQL type?
Next
From: Andres Freund
Date:
Subject: specifying repeatable read in PGOPTIONS