patch: improve cgi speed

Ethan Galstad nagios at nagios.org
Fri Oct 1 05:37:24 CEST 2004


I've applied some of the patches you posted so far.  The service/host 
object sorting patch needs to be changed.  I'll be moving the code 
from objects.c and moving it to xodtemplate.c to fix the problem for 
good.  That way the CGIs will never have to sort the objects as 
they're read from the object cache file - the sorting will be done 
only once by the Nagios daemon when it starts.  I'll take a look at 
the hostgroup/service command patch in a few days.


On 30 Sep 2004 at 16:06, Matthew Kent wrote:

> In a follow up to
> http://thread.gmane.org/gmane.network.nagios.devel/1148 I've found
> another unnecessary service sort when preparing the data for display
> in the cgi's. It's a nice sort to have for nagios core (to write out
> alphabetically sorted service definitions to the cache), but the cgis
> don't need it.
> 
> Removing it has no side effects that I can demonstrate thus far and
> cuts the time to render tac.cgi and status.cgi in half.
> 
> Applying this patch and the previous one mentioned in the thread above
> take the time to render tac.cgi and status.cgi for 4239 hosts and
> 16880 services from between 50secs-64secs to 11secs on my ram starved
> Pentium M 1.2Ghz laptop (256mb ram).
> 
> Patch is against latest cvs, and please let me know if it breaks
> anything.
> 
> Also I've started collecting these patches here
> http://magoazul.com/proj/nagios/patches/ in the hope that Ethan will
> return and look at them someday.
> 
> If not then maybe, like Andreas mentioned, creating another repository
> is a good idea... -- Matthew Kent <mkent at magoazul.com>
> http://magoazul.com

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



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl




More information about the Developers mailing list