Performance issues, too

Robert Hajime Lanning lanning at lanning.cc
Thu Dec 28 13:16:46 CET 2006


<quote who="Tobias Klausmann">
> On Mon, 25 Dec 2006, Robert Hajime Lanning wrote:
>> I have a few that use the output of the last check to see
>> differences in accumulators and the like.  And I see that
>> the caching code caches a parsed version of the arguments.
>> This caching has no expirations just appending the new
>> argument list.
>
> That might explain memory consumption, though one has to wonder
> if linear increase is fast enough to explain it. If the
> arguments get *doubled* everytime, though...

Ok, I have done two things.

1) removed caching of arguments (it now parses arguments every
   time, in the child process)

2) I have modified all my perl based checks to use "my" instead
   of "use vars".  This is to scope the variables to the package
   that the service check is encapsulated in.

So, now my load seems to have lowered to about 1.5 from 2.2.
The CPU time in kernel space no longer grows in that curve
fashion as seen in the graphs posted earlier.  It still grows
but now more linearly and at a slower pace.

I started a cron job, every five minutes, that logs the size
of the master Nagios process in kilobytes. (pagesize is 8k)

The drop from 14920 to 11920 was the cron'd restart of Nagios.
[Thu Dec 28 00:00:01 UTC 2006] 14920
[Thu Dec 28 00:05:00 UTC 2006] 11920
[Thu Dec 28 00:10:00 UTC 2006] 11960
[Thu Dec 28 00:15:00 UTC 2006] 11992
[Thu Dec 28 00:20:00 UTC 2006] 12000
[Thu Dec 28 00:25:00 UTC 2006] 12000
[Thu Dec 28 00:30:00 UTC 2006] 12000
[Thu Dec 28 00:35:00 UTC 2006] 12024
[Thu Dec 28 00:40:00 UTC 2006] 12032
[Thu Dec 28 00:45:00 UTC 2006] 12048
[Thu Dec 28 00:50:00 UTC 2006] 12056
[Thu Dec 28 00:55:00 UTC 2006] 12072

The service check cache code is implemented in the p1.pl,
so I have been really looking at it.

Once the check is compiled, there is a really short code
path in p1.pl for the Nagios master process.  So, I think
the leak is more in ePN, than perlcache.

-- 
And, did Galoka think the Ulus were too ugly to save?
                                         -Centauri


-------------------------------------------------------------------------
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