WEB-Interface performance

Marcel Mitsuto Fucatu Sugano msugano at uolinc.com
Sat Oct 8 00:00:46 CEST 2005


Hello again,

On Thu, 2005-10-06 at 11:16 +0100, Rob Moss wrote:
> Yeah, there are some CFLAGS you could be using to optmise your build..
> I am assuming that you have a recent version of GCC, and that your P4
> HT cpu is shown as having two logical CPU's
> 
> Try rebuilding with the following command:
> 
> cd  nagios-2.0b4
> CC=gcc CFLAGS="-mtune=i686 -O3 -pipe -march=i686 -funroll-loops
> -ffast-math" \
>     ./configure --prefix=/usr/local/nagios ...... [rest of nagios
> configure commands]

I've tried this with no luck, having an error message displaying that
-ffast-math wasn't a recognized flag, with gcc-3.3.5. This was the
second try to handle the cgi's performance. The first thing we tryied,
was setting up a tmpfs mountpoint at /opt/nagios/var/tmpfs, and pointed
nagios to write the status file there, but again with some errors that
was a little weird, the cgi begins to ending prematurely (apache
errorlog), and displaying "500 internal server error". This happened to
10% of the check_http running to test it :), and the response time
didn't get too much of a performace improvement as well.

I don't think this could be Virtual Machine OS's fault, so the problem
might be with the status.cgi reading the tmpfs, but i can't tell for
sure, as we tried this setup yesterday. Is there anyone here who made
it? (status.dat been written in a tmpfs mountpoint?)
> 
> The main problem is that you have thousands of hosts, and thousands of
> services to read in every time you run status.cgi.   No matter how
> efficient the program is, reading in and displaying that much data is
> going to take a while, and running the same program 15 times
> simultaneously is going to affect your performance as you see here.
> How many lines is the status.dat file?  I only have a few hundred
> hosts and services, and the file is 23,000 lines or so, half a meg on
> disk.. I would imagine yours is closer to about 50mb and closer to a
> million lines.
> Some alternatives might be updating the Nagios sidebar so that it
> doesn't display ALL hosts by default, maybe just a smaller hostgroup..
> (although i suspect the status.cgi needs to read in the whole file) Or
> replacing the standard nagios CGI's with something that is more geared
> towards handling hundreds of thousands of hosts/services... 

I agree with you, and i've been reading the nagios-devel list, and saw
that the CGI is a problem to a lot of people who need to maintain some
BIG nagios configuration, over 10k services. I also watch that there is
a patch to improve the performance of the CGIs, but I couldn't find it
anywhere.
> 
> Or perhaps you could have a separate display server, a webserver
> running the cgi's which reads in the nagios status.dat file over the
> network from the nagios server, and does all the processing away from
> the nagios collector.. This would move processing off of the nagios
> collector.. You could use rsync to keep the two files in sync, keep a
> duplicate on the display server on a local disk (or a tmpfs memory
> based filesystem for extra speed)...

We are studying the mysql backend, but my first shot was the tmpfs, and
the recompilation with those flags you mentioned. Hope that exists
something easier than setup a mysql backend, 
-- 
Marcel Mitsuto Fucatu Sugano <msugano at uolinc.com>
Universo Online S.A.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20051007/816e74f7/attachment.html>


More information about the Users mailing list