Re: Misaligned BufferDescriptors causing major performance problems on AMD

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(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-29 22:27:33
Message-ID: 20150129222733.GF24213@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pushed a version (hopefully) fixing Tom's complaints.

On 2015-01-28 13:52:30 -0500, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)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.

It's _PAD_TO_SIZE now.

> 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.)

Yea. The details can be changed in a concise way now. I hope ;)

Greetings,

Andres Freund

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2015-01-29 22:30:54 Re: jsonb, unicode escapes and escaped backslashes
Previous Message Tom Lane 2015-01-29 22:21:14 Re: jsonb, unicode escapes and escaped backslashes