hash buckets

Brian J. Murrell brian_murrell at ssd.bctel.net
Tue Jan 4 23:13:35 UTC 2000


from the quill of Ted Lemon <mellon at isc.org> on scroll
<200001042248.RAA09743 at grosse.manhattan.fugue.com>
> 
> That's it.

Simple enough.

> Not necessarily.   There are enough bits in what is usually being
> hashed to safely allow you to use numbers at least as high as 10k.

Meaning a number of hash buckets as hight as 10k right?

> I'd have to think about it before recommending that you go higher.

Than 10k hash buckets or 97.  I am pretty sure you mean 10k.

> I do recommend that you choose a prime number...

Can I ask why?  Does the hashing algorithm (which I have not studied at any
length yet) work better on prime numbers?

I was wondering about the feasibility of the server dynamically deciding on
a good number for hash buckets at (say) startup.  I cannot think of a way
that does not include a double parsing or processing at least, of the
configuration details though.  Does that sound about right?  How about a
config option?  I guess I am wondering how diverse in size are the networks
that the DHCP server is being required to run in.  Ours is large, but are
we a really small percentage of the installation base?

And I guess one last thing: IYO, is there much benefit to be gained by
reducing the number of items in a bucket from say 50-100 down to 5-10 or
less?  Is a decent enough time spent in the server dealing with the hashes
to make more buckets a decent win?

b.



--
Brian J. Murrell                                    Brian_Murrell at ssd.bctel.net
BCTel Advanced Communications                                      604 454 5279
Vancouver, B.C.



More information about the dhcp-hackers mailing list