host_name and service_description examples

Daniel Drown dan-nagios at drown.org
Tue Jun 14 04:17:20 CEST 2005


On Mon, 13 Jun 2005, Andreas Ericsson wrote:
> I've made some corrections to the benchmark code, and a couple of cheap 
> optimizations. For those who want to test it for themselves (a whopping 
> 3 downloads so far ;), I suggest you leech the new version from 
> http://oss.op5.se/nagios/nagios-hash.tar.gz and give it a shake.
> 
> Ethan; If it's allright with you, I'll go ahead and implement Paul 
> Hsie's hash. It looks up 1074600 hostname strings in 358msecs with the 
> current table-size of 1024 buckets (compared to 987msecs for the 
> additive hash currently in use). I'd also suggest wasting some memory 
> here. Upping the hash-table size to 16384 buckets (64Kb on 32-bit archs) 
> cuts another 40% off the average lookup time while staying fairly 
> friendly to the hardware.

Neat.  I'm afraid the current brain-dead hash function is from me starting
with something simple, and leaving it when it worked for a few thousand hosts
and services.

Thank you for your effort, I have found your collection of hash functions to
be very educational.

- Dan


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20




More information about the Developers mailing list