Hashing, take 2

Andreas Ericsson ae at op5.se
Thu Jul 21 11:02:42 CEST 2005


Andre Bergei wrote:
> Sorry for doubleposting, I somehow managed to unintentionally
> activate the shortcut for "Send" in outlook for the n'th time :/
> 
> 
>>> 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? That is
> good news for us with distributed setups :)
> 

It will, and considerably so. Further speedups are very possible, but 
that requires a slight re-design of object lookup code.

> 
>>> 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. The tac.cgi and status.cgi
> reports a grand totalt of 1024 services :) Let me know if you need me
> to do anyting to pinpoint this bug.
> 

That's weird, considering hash-collisions were much more frequent with 
the old code and it was properly handled.

If you're interested in helping with this, I'd be delighted if you could 
send me your configuration so I can test it myself. You can remove any 
sensitive data, so long as object identifiers remain the same 
(host_name, service_description, hostgroup_name and so on...).

If this is not an option, I might still be able to fix something up but 
testing won't be as reliable.

> As for cgi speed here what I measured :
> 
> Status.cgi with hostgroup=all&style=hostdetail
> 
> Patched nagios:
> 
> real    0m5.596s user    0m5.510s sys     0m0.090s
> 
> Clean nagios:
> 
> real    0m6.523s user    0m6.450s sys     0m0.080s
> 
> Seems to run a bit faster, as you predicted.
> 
> To display all the services for one host takes roughly the same 
> Amount of time.
> 

This was expected (a very small speedup for a large amount of objects). 
GUI speedups require a re-design, and that's wasted effort considering 
the pending new GUI, which will have the chance to redo design from the 
ground up.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
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_id=7477&alloc_id=16492&op=click




More information about the Developers mailing list