Major speedup of CGI

Ethan Galstad nagios at nagios.org
Tue Sep 9 05:51:01 CEST 2003


Daniel Drown submitted a patch a few months (or more) back to add 
chained hash support for speeding up searches.  His patch (with 
alterations) has been incorporated into the 2.0 code and results in 
major speedups in the CGIs, so that's probably good enough for now 
(considering the CGIs will go away in 3.0).


On 5 Sep 2003 at 12:01, David Parrish wrote:

> Attached is another patch to Nagios 1.1 which hugely speeds up the
> CGIs. This is a big benefit when monitoring a lot (~ 7000) of
> services, but there will be a benefit for a smaller number too.
> 
> Profiling shows that most of the time taken to run the CGI is in
> loading the list of services and sticking them into a sorted list.
> 
> This patch turns loading the service list into a 2 step process:
> 
> 1. Load the services into a binary tree (glib)
> 2. Flatten the tree down into the sorted list.
> 
> Before, the CGI took between 3-10 seconds to run, now it takes 0.2
> seconds.
> 
> FYI I didn't write this patch, my boss did. I'm just submitting it.
> 
> -- 
> Regards,
> David Parrish
> 0410 586 121
> 



Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf




More information about the Developers mailing list