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

From Andres Freund
Subject Re: Misaligned BufferDescriptors causing major performance problems on AMD
Date
Msg-id 20140205163737.GE28649@alap3.anarazel.de
Whole thread Raw
In response to Re: Misaligned BufferDescriptors causing major performance problems on AMD  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Misaligned BufferDescriptors causing major performance problems on AMD  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2014-02-05 11:23:29 -0500, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > And I think somebody already thought about it (c.f. ALIGNOF_BUFFER), it
> > just wasn't updated in the last 10 years.
> 
> No, ALIGNOF_BUFFER is there because we read something that said that I/O
> transfers between userspace and kernel disk cache would be faster with
> aligned buffers.  There's been no particular thought given to alignment
> of other data structures, AFAIR.

But it's not aligned anymore on at last half a decade's hardware, and
it's what we already align *all* bigger ShmemAlloc() values with. And
BufferDescriptors surely counts as larger in its entirety.

> It may well be that your proposal is spot on.  But I'd like to see some
> data-structure-by-data-structure measurements, rather than assuming that
> alignment must be a good thing.

I am fine with just aligning BufferDescriptors properly. That has
clearly shown massive improvements.

Greetings,

Andres Freund

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



pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: jsonb and nested hstore
Next
From: Tom Lane
Date:
Subject: Re: jsonb and nested hstore