Nagios 2.0 performance

Ben bench at silentmedia.com
Thu Sep 23 17:00:40 CEST 2004


On Sep 23, 2004, at 4:24 AM, Einar Indridason wrote:

> On Sat, Sep 11, 2004 at 09:37:32AM -0500, Marc Powell wrote:
>>
>>
>> I would hardly use the word obviously. What evidence do you have to 
>> back
>> this assertion? What do you mean by 'parsing'? The status file on my
>> system is just over 900k and clearly delimited, hardly a challenging
>> file to 'parse'. If you think that nagios is parsing nagios.log each
>> time you should do some more research. I'm not a coder but I do have
>> years of experience with Nagios and tend to lean toward the list
>> traversals (which is really the parsing) as a big performance hit as 
>> has
>> been discussed here recently and in the past. There have been very
>> significant performance improvements in that regard in 2.0.
>
> Actually, what we should do here, is to profile the cgi's, and *see*
> where the hotspot is.
>
> If the compiler used is gcc, we have to add a switch, "-gp" (generate
> profile) for the programs in question.  Run the program(s) once, and 
> then
> run "gprof program", to see where most time was spent.
>
> Measure, not speculate.

I have remeasured nagios 2, and, as I remember, almost all of the time 
required to display tac.cgi is spent reading config files. I can 
understand how a 20 second load might be acceptable for a report, but 
for a simple status overview, even 5 seconds is pushing it in my view. 
More importantly to me, it's pushing it for my bosses.
>
> One possible solution would be to use shared memory, where one process
> (the nagios one, or someone else maybe) holds the needed information, 
> so
> the CGI's just have to read from the shared memory.

The big problems with a shared memory solution:

1. The cgis must continue to be written in C if they want high 
performance. While I personally don't have a problem with this, it's 
not the direction of nagios.
2. The cgis must reside on the same box as nagios.

Doing things with a well-implemented database avoids these problems 
*and* gives you the ability to radically speed up reporting, as well. 
At least I assume it would speed up reporting, I've only profiled 
tac.cgi. :)



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
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