Re: Memory Alignment in Postgres - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Memory Alignment in Postgres
Date
Msg-id 20140911142717.GD17294@awork2.anarazel.de
Whole thread Raw
In response to Re: Memory Alignment in Postgres  (Arthur Silva <arthurprs@gmail.com>)
Responses Re: Memory Alignment in Postgres  (Arthur Silva <arthurprs@gmail.com>)
List pgsql-hackers
On 2014-09-11 10:32:24 -0300, Arthur Silva wrote:
> Unaligned memory access received a lot attention in Intel post-Nehalen era.
> So it may very well pay off on Intel servers. You might find this blog post
> and it's comments/external-links interesting
> http://lemire.me/blog/archives/2012/05/31/data-alignment-for-speed-myth-or-reality/

FWIW, the reported results of imo pretty meaningless for postgres. It's
sequential access over larger amount of memory. I.e. a perfectly
prefetchable workload where it doesn't matter if superflous cachelines
are fetched because they're going to be needed next round anyway.

In many production workloads one of the most busy accesses to individual
datums is the binary search on individual pages during index
lookups. That's pretty much exactly the contrary to the above.

Not saying that it's not going to be a benefit in many scenarios, but
it's far from being as simple as saying that unaligned accesses on their
own aren't penalized anymore.

Greetings,

Andres Freund

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



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: pgbench throttling latency limit
Next
From: Костя Кузнецов
Date:
Subject: gist vacuum seaq access