status.cgi performance problems.

Thomas Guyot-Sionnest dermoth at aei.ca
Tue Feb 3 15:11:15 CET 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/02/09 08:17 AM, Alessandro Ren wrote:
>      Has anyone experience such problems?
> 
>      []s.
> 
> On 1/11/2009 3:57 PM, Alessandro Ren wrote:
>>       We have a nagios system with 6000 services and 300 hosts and when
>> many users access it simultaneously, stagus.cgi sometimes takes up to 20
>> seconds too answer, so does the tac.cgi and extinfo.cgi, that status.log
>> parser drags all the cpu.
>>       I patched the code to store status.log on memcahed, but the gain in
>> performance was not great, I also stored objectscache, no speed
>> improvement. So I am thinking about storing the already parsed
>> structures in memcache to see.
>>       Does anyone knows any good seralization library to serialize the
>> nagios structures or a way to improve perfomence?

How did you store it? Did you just stored the whole file or made keys to
minimize parsing?

The problem with the current CGI is that it reads the whole file and
parse it. Even if you minimize parsing, you will still have to load all
of it unless you modify heavily the cgi.

Nagios 3.1 is introducing a PHP interface which should solve this
problem, however it relies on NDODB which might get you into other
issues like longer restart time.

Memcached could be an option, I'd also like to test using CDB files as a
drop-in replacement for the plain text status.dat (CDB and Memcached as
storage engines are very similar - implementing one you get the other at
the tip of your fingers...) But as long as you'll be using a CGI that
needs everything instead of just the info to be displayed, load times
will be long.

If I find some time I'll probably try to get a CDB/Memcached interface
working with 3.1's php web interface.

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJiFCD6dZ+Kt5BchYRAtL2AKDEz48CQRgOU2VB1xyJIE4q7PquUgCfZShN
giHcAWly5wfjTRQCQjmEZAg=
=Xx8W
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com




More information about the Developers mailing list