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

From Tom Lane
Subject Re: Misaligned BufferDescriptors causing major performance problems on AMD
Date
Msg-id 5011.1422471150@sss.pgh.pa.us
Whole thread Raw
In response to Re: Misaligned BufferDescriptors causing major performance problems on AMD  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Misaligned BufferDescriptors causing major performance problems on AMD
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2015-01-28 13:38:51 -0500, Tom Lane wrote:
>> #define BUFFERDESC_PADDED_SIZE    (SIZEOF_VOID_P == 8 ? 64 : 32)

> Hm, did you intentionally put a 32in there or was that just the logical
> continuation of 64? Because there's no way it'll ever fit into 32 bytes
> in the near future. That's why I had put the sizeof(BufferDesc)
> there. We could just make it 1 as well, to indicate that we don't want
> any padding...

Yeah, 1 would be fine too.  Maybe better to call it BUFFERDESC_MIN_SIZE,
because as this stands it's enforcing a min size not exact size.  (I'm
not going to whinge about that aspect of it; the main point here is to
put in the union and fix the ensuing notational fallout.  We can worry
about exactly what size to pad to as a separate discussion.)
        regards, tom lane



pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: hung backends stuck in spinlock heavy endless loop
Next
From: Fabrízio de Royes Mello
Date:
Subject: Re: Providing catalog view to pg_hba.conf file - Patch submission