Hashing, take 2
Andre Bergei
andre.bergei at ementor.no
Thu Jul 21 00:14:55 CEST 2005
> > Hi.
> >
> > Does this patch speed up the cgi's?
>
> Slightly, yes, but a different amount on different systems
> based on the conditions below. The greatest benefit will be
> for systems that accept a receive a large amount of passive
> checks though.
You mean it will speed up the processing of passive checks?
> On systems where strlen() isn't a compiler intrinsic it will
> provide a fairly large boost.
>
> If you used to have lots of collisions with the additive hash
> previously used you should see a fairly nice improvement
> (there's no way of knowing how many collisions you had per
> bucket without hashing all of your data with both algorithms
> and comparing it). Typically, networks with a proper
> naming-standard has many collisions with additive hashes.
>
> Systems where strcmp() isn't a compiler intrinsic, or where
> 8-bit operations are terribly expensive, will see a vast
> improvement, although this depends largely on the condition
> above as well as the number of elements monitored.
>
> Systems with a large call overhead will benefit greatly as
> the hash-functions and some of the hash-comparison functions
> are inline.
>
> Systems where the compiler does poor branch-prediction should
> see some fairly large improvements.
>
> Very small installations will notice a very slight
> performance degradation (actually, they won't notice it
> because pages will appear to load instantaneously anyways).
> > If so i'm willing to take it for a spin and report my findings.
> >
>
> Please do. The main issue at hand here is stability at first.
> If this patch works out well we can start chopping up the
> code to be better compartmentalized and each section of it
> can then be optimized to the extremes wrt both resources and
> speed without having to gamble with stability.
With summer comes spare time, yay :)
I've finally got around to testing this patch, and I think i've found a
bug.
The deamon starts fine, and nagios -v reports 32616 services and 3033
hosts.
But the cgi's do not show all my services.
>
> As for the GUI, it would need a complete re-design that would
> also affect the core for it to be noticably faster. Ethan's
> not willing to do that (I agree with him) since the effort
> would be wasted once the new GUI emerges.
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
More information about the Developers
mailing list