Loading slow with large cfg file

Andreas Ericsson ae at op5.se
Wed Oct 19 22:58:22 CEST 2005


Billow Gao wrote:
> Generated a 20M configuration file(10K services in total), but it took
> nagios more than 10 minutes to read the configuration file.
> 
> If I split the configuration files to many smaller files, load can be done
> in 5 minutes.
> 

On what hardware was this? Was there extensive IO-latency? What was the 
system load before, during and after the loading?

> Why loading a single configuration file is slower than 10K small cfg files?
> 
> It seems that nagios need work on how to improve the speed of load cfg
> files... :)
> 

You can help it load things faster by making sure objects that are 
referenced are already parsed and loaded. For instance, make sure all 
your hosts are loaded before the hostgroups and hostextinfo stuff. 
Timeperiods, contacts and contactgroups (i.e. items that are commonly 
used by many other objects) should be loaded first.

If you're really interested in tweaking performance you could try and 
add some code to count the hash collisions. That might be a major 
timeconsumer for you if you're using similarly named objects of a 
certain type (the hashing algorithm in Nagios isn't very good).

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list