From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kenneth Marshall <ktm@rice.edu>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: pgsql-patches@postgresql.org
Cc: twraney@comcast.net
Cc: neilc@samurai.com
Subject: Re: updated hash functions for postgresql v1
Date: Sun, 06 Apr 2008 12:02:25 -0400
Message-ID: <711.1207497745@sss.pgh.pa.us> (raw)
In-Reply-To: <20080405214050.GA4802@it.is.rice.edu>
References: <20071027201557.GW27320@it.is.rice.edu>
<1193592458.4242.713.camel@ebony.site>
<20071028180558.GY27320@it.is.rice.edu>
<1193602018.4242.737.camel@ebony.site>
<23832.1207424435@sss.pgh.pa.us>
<20080405214050.GA4802@it.is.rice.edu>
Kenneth Marshall <ktm@rice.edu> writes:
> Okay, I will strip the VALGRIND paths. I did not see a real need for them
> either.
I have a patch ready to commit (as soon as I fix the regression test
issues) that incorporates all the word-wide-ness stuff. All you really
need to look at is the question of hash quality.
I did confirm that the mixing changes account for a noticeable chunk
of the runtime improvement. For instance on a Xeon
hash_any_old(32K): 4.386922 s (CVS HEAD)
hash_any(32K): 3.853754 s (CVS + word-wide calcs)
hashword(32K): 3.041500 s (from patch)
hashlittle(32K): 3.092297 s (from patch)
hash_any_old(32K unaligned): 4.390311 s
hash_any(32K unaligned): 4.380700 s
hashlittle(32K unaligned): 3.464802 s
hash_any_old(8 bytes): 1.580008 s
hash_any(8 bytes): 1.293331 s
hashword(8 bytes): 1.137054 s
hashlittle(8 bytes): 1.112997 s
So adopting the mixing changes would make it faster yet. What we need
to be certain of is that this doesn't expose us to poorer hashing.
We know that it is critical that all bits of the input affect all bits
of the hash fairly uniformly --- otherwise we are subject to very
serious performance hits at higher levels in hash join, for instance.
The comments in the new code led me to worry that Jenkins had
compromised on that property in search of speed. I looked at his
website but couldn't find any real discussion of the design principles
for the new mixing code ...
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-patches@postgresql.org
Cc: tgl@sss.pgh.pa.us, ktm@rice.edu, simon@2ndquadrant.com, twraney@comcast.net, neilc@samurai.com
Subject: Re: updated hash functions for postgresql v1
In-Reply-To: <711.1207497745@sss.pgh.pa.us>
References: <20071027201557.GW27320@it.is.rice.edu> <1193592458.4242.713.camel@ebony.site> <20071028180558.GY27320@it.is.rice.edu> <1193602018.4242.737.camel@ebony.site> <23832.1207424435@sss.pgh.pa.us> <20080405214050.GA4802@it.is.rice.edu> <711.1207497745@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox