Nagios memory usage 1.2 vs 1.1

Bruce Elrick bruce at elrick.ca
Sat Jun 19 23:25:55 CEST 2004


Hello,

Any comments would be appreciated.  I searched the SourceForge archive 
of this mailing list for "memory leak Perl" etc. and didn't find anything.

I've got a production Nagios server running 1.1 and a test/dev one 
upgraded to 1.2 (both using RPM installs running on Redhat 9, host 
servers are Compaq DL360, 1 CPU 1 GHz, 384 MB RAM, 256 MB swap, RAID 1 
36 GB SCSI drives).  Both instances run (nearly) identical check loads.

The 1.1 instance has a memory SIZE (as reported by 'top') of 780 kB and 
an RSS of 764 kB.

The 1.2 instance has a memory SIZE of 134 MB and and RSS of 116 MB.

Judging by changes we had to make to our Perl-based check scripts (and 
observing error messages), I can glean that 1.2 runs Perl-based check 
scripts in a persistent Perl interpreter using ExtUtils::Embed.  I also 
see that it runs them with an implicit "use strict;" directive.

Anyway, I can understand how this can be much more CPU and I/O efficient 
than forking a new Perl interpreter on each check.  However, I'm 
wondering if anyone has a metric as to whether the 134 MB size is 
reasonable?

I don't know whether Embed caches the compiled Perl intermediate code 
for the multiple check scripts that are called or how it manages memory, 
but even with a half dozen or fewer unique Perl-based check scripts and 
<100 services, I'm wondering whether 134 MB is reasonable or if there is 
a memory leak.

The memory usage started out at 3-4 MB after a few minutes, grew to 32 
MB overnight, then was at 134 MB after a day or so.  At this point, the 
response time of the Apache-based Admin Console for Nagios (and other 
Apache responses) is on the order of 5-10 seconds, presumably because of 
swaping of memory pages.

Anyone have similar observances or perhaps comments/advice?

Thanks,
Bruce Elrick


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
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