Re: [Nagios-devel] Difference in CPU time with and without ePN

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Difference in CPU time with and without ePN

Post by Guest »

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

Thomas Guyot-Sionnest wrote:
> Andreas Ericsson wrote:
>> Thomas Guyot-Sionnest wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> On 09/01/08 03:35 AM, Andreas Ericsson wrote:
>>>> Have you found a way around the memory leakage? Otherwise, I still believe
>>>> it's more hassle than it's worth, and effort would be better spent to cut
>>>> the number of fork()'s in half by having Nagios multiplex its checks.
>>> I never noticed any memory problem with the ePN and my Nagios often ran
>>> for many consecutive months without being stopped (doing SIGHUPs from
>>> time to time to update the config trough)
>>>
>>> Could you direct me to some documents of communication archives that
>>> point out the problem?
>>>
>> http://www.google.se/search?q=%2Bnagios ... ry+leak%22
>
>> Embedded perl leaks memory. Alot. If you have a setup where it doesn't,
>> you're pretty much unique. Look for "memory leak" or "embedded perl" in
>> the nagios-devel and nagios-users archives, apart from the link above.
>
>> Which versions of Nagios and Perl are you using? What system/hw is this
>> on? ld, glibc and gcc versions might also be interesting, as well as
>> which options you used when compiling Nagios.
>
>> If the plugins are custom ones, that could also be worth having a look
>> at. In so far as I know though, Stanley Hopcroft has been trying well
>> over a year to consign the leaks into oblivion, with some but far from
>> complete success, and the result varies heavily depending on a lot of
>> different things, all of which aren't 100% clear to anyone.
>
>
> Well, yesterday I had to kill and restart Nagios to make changes to Perl
> modules apply (HUP wouldn't do) and it's true that Nagios now use much
> less memory, so indeed there seems to be leaks. However with 2GiB of RAM
> it would take months (maybe more than a year) to fill up the server
> memory. I don't graph real memory usage yet (used memory minus
> cache/buffers) so I can't really tell how fast it increase, but it's for
> sure not a big deal with 2GiB.
>
> HUPs have been said to cause memory leaks as well and
> 1. In average I probably HUP Nagios 2-3 times a week.
> 2. Automated scripts probably do the same on config pulls from AD (The
> HUP only happens if the config changes, but that happens quite often)
>
> On the solutions side, you can.
>
> 1. Kill and restart Nagios instead of HUP'ing it (Why don't nagios
> execve itself on HUPs BTW?)
> 2. Monitor the Nagios process memory usage, with optionally an event
> handler for automated restarts
> 3. Schedule automated restarts every day/week/month or so
> 4. Add more memory
>
> For me the benefits is definitely worth the downsides.

Oh and I forgot to say... On the software side:

Slackware 11, Nagios 2.7, Perl v5.8.8.
GNU ld, gcc and glibc from Slackware 11 (Just like Perl btw).
Dual Xeon (+ hyperthreading) == 4 logical CPUs.

Relevant Nagios configure options:
'--enable-embedded-perl' '--with-perlcache' '--with-nanosleep'

For the plugins, I use most of those I posted in NagiosExchange (user
"dermoth"). They're all carefully written for ePN.

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

iD8DBQFHhP9e6dZ+Kt5BchYRAr+9AJ4zIK+2lOWq20tQekJGQ22oA8D/hwCg3dAf
6Syq4NQlqChc4MFMg2+o6kE=
=Rer0
-----END PGP SIGNATURE-----





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked