Re: Memory buffer alignment - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Memory buffer alignment
Date
Msg-id 3149.1063921594@sss.pgh.pa.us
Whole thread Raw
In response to Memory buffer alignment  (Manfred Spraul <manfred@colorfullife.com>)
Responses Re: Memory buffer alignment
List pgsql-hackers
Manfred Spraul <manfred@colorfullife.com> writes:
> Unfortunately it's the slower one: Intel cpus have a microcode fastpath 
> for memcopies that are 8-byte aligned. This fastpath is around 50% 
> faster than the manual copy that is used for "misaligned" (i.e. only 
> 4-byte aligned) pointers.

Maybe it'd be worth setting MAXIMUM_ALIGNOF to 8 on such CPUs?  Or at
least hacking ShmemAlloc and friends to use 8-byte alignment.  I assume
the major issue here is that the shared buffers don't get 8-byte-aligned
within the shared memory segment.

Are there any machines where it'd be worth forcing an even larger
alignment for the buffers?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Carlos Guzman Alvarez
Date:
Subject: Array Parameters on protocol 3.0
Next
From: Gaetano Mendola
Date:
Subject: Re: 7.4beta2 vs 7.3.3