Re: Align large shared memory allocations - Mailing list pgsql-patches

From Tom Lane
Subject Re: Align large shared memory allocations
Date
Msg-id 12514.1064167452@sss.pgh.pa.us
Whole thread Raw
In response to Re: Align large shared memory allocations  (Manfred Spraul <manfred@colorfullife.com>)
List pgsql-patches
Manfred Spraul <manfred@colorfullife.com> writes:
> Tom Lane wrote:
>> This patch is missing a demonstration that it's actually worth anything.
>> What kind of performance gain do you get?
>>
> 7.4cvs on a 1.13 GHz Intel Celeron mobile, 384 MB RAM, "Severn" RedHat
> Linux 2.4 beta, postmaster -N 30 -B 64, data directory on ramdisk,
> pgbench -c 10 -s 11 -t 1000:
> Without the patch: 124 tps
> with the patch: 130 tps.

I tried it on an Intel box here (P4 I think).  Using postmaster -B 64 -N 30
and three tries of pgbench -s 10 -c 1 -t 1000 after creation of the test
tables, I get:

tps = 92.461144 (including connections establishing)
tps = 92.500572 (excluding connections establishing)

tps = 88.078814 (including connections establishing)
tps = 88.115905 (excluding connections establishing)

tps = 85.434473 (including connections establishing)
tps = 85.468807 (excluding connections establishing)

and with the patch:

tps = 122.927066 (including connections establishing)
tps = 122.998129 (excluding connections establishing)

tps = 110.716370 (including connections establishing)
tps = 110.773928 (excluding connections establishing)

tps = 138.155991 (including connections establishing)
tps = 138.245777 (excluding connections establishing)

So there's definitely a visible difference on recent Pentiums.  It might
not help on other CPUs, but we can surely waste a couple dozen bytes in
the hope that it might.

Patch applied.  Do you want to look at making it happen for local
buffers and buffile.c as well?

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: contrib mode - pgenv
Next
From: Joe Conway
Date:
Subject: bug fix: TupleDescGetAttInMetadata/BuildTupleFromCStrings with dropped cols