Re: hash_create API changes (was Re: speedup tidbitmap patch: hash BlockNumber)

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Teodor Sigaev <teodor(at)sigaev(dot)ru>, David Rowley <dgrowleyml(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hash_create API changes (was Re: speedup tidbitmap patch: hash BlockNumber)
Date: 2014-12-24 19:58:41
Message-ID: 549B1AF1.4020501@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/24/14, 10:58 AM, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
>> On 2014-12-24 00:27:39 -0600, Jim Nasby wrote:
>>> pgbench -S -T10 -c 4 -j 4
>>> master:
>>> tps = 9556.356145 (excluding connections establishing)
>>> tps = 9897.324917 (excluding connections establishing)
>>> tps = 9287.286907 (excluding connections establishing)
>>> tps = 10210.130833 (excluding connections establishing)
>>>
>>> XXH32:
>>> tps = 32462.754437 (excluding connections establishing)
>>> tps = 33232.144511 (excluding connections establishing)
>>> tps = 33082.436760 (excluding connections establishing)
>>> tps = 33597.904532 (excluding connections establishing)
>
>> FWIW, I don't believe these results for one second. It's quite plausible
>> that there's a noticeable performance benefit, but a factor of three is
>> completely unrealistic... Could you please recheck?
>
> A possible theory is that the hash change moved some locks into
> different partitions causing a large reduction in contention,
> but even then 3X seems unlikely. And of course if that was
> the mechanism, the result is still pure luck; other examples
> might get worse by the same amount.

I must have screwed something up, because if anything I see a small loss for XXH now (but my laptop isn't consistent enough to be sure).

This surprises me given that SMHasher shows XXH to be 50% faster than Spooky for 20 byte keys.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2014-12-24 21:58:06 Re: replicating DROP commands across servers
Previous Message Alex Shulgin 2014-12-24 19:11:08 Re: Turning recovery.conf into GUCs