dbTalk Databases Forums  

Relative speeds of Pick flavors

comp.databases.pick comp.databases.pick


Discuss Relative speeds of Pick flavors in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #41  
Old   
Robert Colquhoun
 
Posts: n/a

Default Re: Relative speeds of Pick flavors - 11-09-2003 , 07:31 AM






Hello Art,

On Fri, 24 Oct 2003 16:59:05 GMT, Art Martz <artmartz (AT) triad (DOT) rr.com>
wrote:
Quote:
Allright then. Here is a version you could call bench-lite. It doesn't try to figure out what
platform it's running on. You set that on the third line. I don't know the correct format for
file creates for mvbase/jbase/unidata. Somebody that knows will have to supply that. Screen
prints are reduced to a minimum, so as not to impact the times. There is no attempt to update
results into the MD file. It still checks the MD file for multi-user benchs. After the code is
what my D3/NT platform returns. Is this better?
It is good that you fixed the screen updates and removed some of the
platform specific code.

I looked at your new version it still has the following issues:

1) Uses TIME() to measure things
This is too course on fast machines, will not work across midnight and
more importantly is *wall* clock time not cpu time leading to
inconsistent results. Use SYSTEM(9) instead it was put in for this
task.
2) Tests are too long, other processes on the machine are more likely
to interrupt screwing up the results.
3) Keys interact badly with hash algorithm.
Not sure if you meant this but your keys are of the form:
ABCDABCDBENCHMARK.PICK
where ABCDABCD are the only part that varies among the records. The
traditional pick hash function i think is 32 bit limited and right
biased meaning for long keys it is important that the rightmost part
is variable.
4) Even fixing 3) the keys seem to resonate(alternating empty groups
and grossly overflowed groups) with the hash algorithm.
5) For some reason you use RND() as part of the record, i don't think
anyone does but good random numbers are hard to produce....this
shouldnt be counted as part of your write time. Also this means you
cannot later read back records as a check.
6) You create dict items '1', '2','3' etc what happens if you want to
benchmark 'SELECT JUNK WITH 1 = 1' What exactly would you get?

- Robert



Reply With Quote
  #42  
Old   
Art Martz
 
Posts: n/a

Default Re: Relative speeds of Pick flavors - 11-10-2003 , 12:27 PM






Robert Colquhoun wrote:

Quote:
1) Uses TIME() to measure things
This is too course on fast machines, will not work across midnight and
more importantly is *wall* clock time not cpu time leading to
inconsistent results. Use SYSTEM(9) instead it was put in for this
task.
2) Tests are too long, other processes on the machine are more likely
to interrupt screwing up the results.
This was designed to be the only thing the system is doing. Not on a
live production system. You need *some* control of the environment for
repeatable results. Since the overall run time should ideally be in the
5-30 minutes range, I don't really think system(9) vs. time() is *that*
big of a deal. I don't have a problem with changing it, I just don't see
much change in the results by doing so.

Quote:
3) Keys interact badly with hash algorithm.
Not sure if you meant this but your keys are of the form:
ABCDABCDBENCHMARK.PICK
where ABCDABCD are the only part that varies among the records. The
traditional pick hash function i think is 32 bit limited and right
biased meaning for long keys it is important that the rightmost part
is variable.
4) Even fixing 3) the keys seem to resonate(alternating empty groups
and grossly overflowed groups) with the hash algorithm.
Well, I was trying to avoid all this (back umpteen years ago when I
first borrowed (stole) some code to start this bench). I'd be interested
in any other comments from anybody else about how to best generate IDs
that hash evenly thru a properly sized D3 style hashed file. Randomize
both the left *and* the right sides of the key?

Art



Reply With Quote
  #43  
Old   
frostalicious
 
Posts: n/a

Default Re: Relative speeds of Pick flavors - 11-10-2003 , 12:36 PM



Art Martz wrote:
[snip]
Quote:
I'd be interested in any other comments from anybody else
about how to best generate IDs that hash evenly thru a
properly sized D3 style hashed file.
Randomize both the left *and* the right sides of the key?
Sequentialize the right side of the key.
Don't randomize anything (including left
side of key) for repeatable results.

I'd use sequential item IDs, all numeric, same length,
padded on left with zeroes. Trite, but adequate.

Then, set your modulo to 10 for a perfect hash! =`;^>

-- frosty




Reply With Quote
  #44  
Old   
Mark Brown
 
Posts: n/a

Default Re: Relative speeds of Pick flavors - 11-10-2003 , 06:32 PM



The actual hashing algorithm isn't that tough. Just add the binary of the
bytes of the key and divide by the modulo of the file and add 1. In a file
with a modulo of 7, item ids like 1ABCDEF, 2ABCDEF and 3ABCDEF all hash into
different groups.

Mark

"Art Martz" <artmartz (AT) triad (DOT) rr.com> wrote

Quote:
Robert Colquhoun wrote:
3) Keys interact badly with hash algorithm.

Well, I was trying to avoid all this (back umpteen years ago when I
first borrowed (stole) some code to start this bench). I'd be interested
in any other comments from anybody else about how to best generate IDs
that hash evenly thru a properly sized D3 style hashed file. Randomize
both the left *and* the right sides of the key?

Art




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.