Nagios 2.0 performance
Andreas Ericsson
ae at op5.se
Thu Sep 23 18:17:13 CEST 2004
Ben wrote:
>
> On Sep 23, 2004, at 4:24 AM, Einar Indridason wrote:
>
>>
>> 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.
A better way to speed up the functions discussed earlier is to write
them in PHP. This is true for a couple of reasons:
1. PHP reads files using clever memory management techniques that depend
highly on the underlying filesystem. This ensures maximum read speed,
but is very tiresome to write in C.
2. PHP handles hashes faster than any other script language. This
resolves the linked list traversal issue which, if I'm not mistaken, was
what you reported to be the biggest time- and resource-hogger.
3. PHP does auto-output buffering so that network traffic isn't
fragmented so much. This might seem like a small improvement, but
simplifies things enormously for the system it's run on.
> 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. :)
>
It would. It would also allow for GUI designers to move much of the
tedious logic (selecting report periods, connecting services to hosts,
etc. etc.) to the database level where it belongs.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Lead Developer
-------------------------------------------------------
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