Re: Misaligned BufferDescriptors causing major performance problems on AMD

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <stark(at)mit(dot)edu>, Peter Geoghegan <pg(at)heroku(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Misaligned BufferDescriptors causing major performance problems on AMD
Date: 2015-01-27 02:13:31
Message-ID: CA+Tgmoak+vo75xfPbJZ9xoLS0zRLg_awo+cC0PuQib6N7COG7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 26, 2015 at 9:08 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> Contrary opinions? Robert?
>
> I'm totally OK with further aligning just that one allocation.

Of course, now that I think about it, aligning it probably works
mostly because the size is almost exactly one cache line. If it were
any bigger or smaller, aligning it more wouldn't help. So maybe we
should also do something like what LWLocks do, and make a union
between the actual structure and an appropriate array of padding bytes
- say either 64 or 128 of them.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip kumar 2015-01-27 02:26:22 Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]
Previous Message Robert Haas 2015-01-27 02:08:25 Re: Misaligned BufferDescriptors causing major performance problems on AMD