Difference in CPU time with and without ePN
Thomas Guyot-Sionnest
dermoth at aei.ca
Fri Jan 18 12:40:11 CET 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 17/01/08 01:44 AM, William Leibzon wrote:
> [Note: this is not a reply to particular message but thread in general]
>
> I've used nagios with embedded perl for quite a long time with fairly
> heavy number of perl checks (in fact most of the plugins) and I've not
> seen any serious memory leaks. I've also tested CPU
> usage both with and without ePN and with ePN its 50%-75% less. Now to
> be fair nagios installations I've set it up on do not run forever and
> usually set to restart nagios server
> once week. But if there were serious memory leaks I'd have noticed as I have specialized memory
> plugin specifically looking for such issues (nagios dnx code from
> June had big issue there BTW although new version I just downloaded
> seems to have lot of it fixed but I can still see it leaking).
>
> As far as Perl I suspect the issues are specific to perl modules &
> plugins you may be using rather then being ePN issues in general (note
> that I'm not using Nagios::Plugin at all for example). If that is so,
> then try forcing nagios to reload/recache the plugin by modifying it (I
> think just adding extra line with '#' at the end of file should be
> enough) In general it might actually be a good idea for nagios to have a
> compiled setting on maximum amount of time perl plugin code would be cached and then
> whenever nagios checks if plugin code has changed it can also check when
> it was last cached and if its too long recache it even if the code is
> still the same; this should really apply to both plugins and perl
> modules which does present some extra challenges. At the same tiem my
> understanding of embedded perl architecture used by nagios is still
> limited (I've even tried once to do something similar myself based on
> nagios code but could not understand some of what I saw [I plan on
> trying it again when I have more time which is always an issue...] but
> ePN is not that simple and may well have leak somewhere that is not
> consistently showing for everyone).
I don't think clearing the cache will be enough; i believe the lost
memory is truly lost and cannot be recovered...
On the system from which the CPU graph was taken I monitored closely
Nagios memory usage and I couldn't see any sign of leak at all over
days. On a test box I set-up with Nagios 3 (similar software) using the
same config, there seems to be a small memory leak (1-2MB/day maximum)
but I didn't monitored it long enough yet to confirm. Also a comparison
is hard to make as many plugins are timing-out as I can't put the server
in the right VLAN right now... Maybe the timeouts could have something
to do as it abruptly terminates the plugins.
I use Perl 5.8.8 on Slackware 11. My plugins uses some of these modules:
utils.pm qw($TIMEOUT %ERRORS) (From Nagios-plugins 1.4.11)
Nagios::Plugin
Getopt::Long
Net::LDAP
Net::DNS
Time::HiRes qw(gettimeofday tv_interval)
DBI (Drivers: DBD::Sybase, DBD::mysql)
Class::Date
Any plugins not bundled with Perl are installed from CPAN so they are
all fairly recent.
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHkJAb6dZ+Kt5BchYRAp1fAKDF64mJKyRRCk7iNJ/gpPeDgx7/KgCfbTou
ubJSVpQ2B1sZhBIzrg1sBMM=
=OUc3
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
More information about the Developers
mailing list