Memory leaks

Tobias Klausmann klausman at schwarzvogel.de
Wed Jan 24 13:07:50 CET 2007


Hi! 

On Wed, 24 Jan 2007, Andreas Ericsson wrote:
> > Activating the embedded Perl interpreter and -cache will increase
> > the amount of lost memory to about 5-6M per hour. In this case,
> > however, sometimes the memory usage snaps back, i.e. some of the
> > lost memory is collected. I've not yet found out what triggers
> > the reclaim. Still, over the course of hours, more and more
> > memory is lost. Still, it's roughly linear memory loss.
> 
> Yes. Embedded perl is known to be leaky. It's also mentioned in various
> documents around the web.

Well, I think I can live without the embedded interpreter, the
machine is beefy enough.

> > Unfortunately, performance degradation is not just on the memory
> > used front. With increased memory usage, check latency increases.
> > In the worst case, this can mean that latency increases by 120s in
> > about six hours. This has the net effect that for our case, we
> > have to restart Nagios every two hours. 
> 
> The latency increase should only happen when the machine starts swapping.
> For large networks with the access-patch thingie that could happen fairly
> quickly though, I imagine.

No, it's definitely not swapping (as the graphs show). My
conclusions about the reasons for the degradation were drawn with
exactly that in mind.


> > For the case of 2.5 and 2.6 without the permissions patch, it's
> > a lot less bad, but still bad enough to require restarting Nagios
> > at least every eight hours. 
> > 
> > Without all the fancy stuff, we get to restarting Nagios every 24
> > hours, as described above.
> 
> That seems a bit obsessive. Are you doing anything unusual with the system?
> We have several (well over a hundred) installations where Nagios has been up
> and running for several months without requiring a restart.

Well, the system is a standalone Nagios server which is only
that, no other services. I'll take a very close look at all the
cronjobs etc. that might cause additional friction, but I doubt
they're causing any trouble.

> > For vanilla Nagios, at least it's clear that in whatever way
> > memory is wasted, it also slows Nagios down - a possibility would
> > be a linked list that is walked and gets appended over and over.
> > But I guess those with knowledge of the inner workings of Nagios
> > have more clue about this than I do.
> 
> Anyone wanting to look into it should probably take a look at the
> event scheduling queue.

Thanks, I'll ask our resident C guru to take a close look at it.

Regards,
Tobias

-- 
Never touch a burning system.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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