[Nagios-devel] USE_MEMORY_PERFORMANCE_TWEAKS

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

[Nagios-devel] USE_MEMORY_PERFORMANCE_TWEAKS

Post by Guest »

I have a machine with 1gb ram and 2gb swap and I was running pretty heavily
into swap, so while looking for why this was happening, I was seeing the
nagios child processes (the ones waiting for plugin output) not sharing as
much memory with the master parent process.

I believe what is happening is as the free() calls modifies memory, (as libc
puts the memory back on the free list) all the parent pages are getting
copied in the child. Since I have a system that does copy-on-write for
fork'ed children (are there any modern systems that don't do COW?), I'd rather
not free the memory and just have it shared.

I'd like to advocate this be the default for nagios :)

my results are at:

http://dan.drown.org/nagios/use-memory- ... weaks.html

time output of stock nagios 1.0b6:
43.75user 198.26system 5:04.08elapsed 79%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (261major+9166642minor)pagefaults 0swaps

time output of nagios 1.0b6 w/ USE_MEMORY_PERFORMANCE_TWEAKS:
47.34user 215.86system 5:10.71elapsed 84%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (246major+9196473minor)pagefaults 0swaps

I should mention that I only saw this after moving from RedHat 7.3 to 8.0.
Either the kernel is more swappy or libc memory management has changed.

--
It's looking like if MySQL AB doesn't make a movie based on the manual,
nobody's ever gonna learn how to use a database.
- r.





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: dan-nagios@drown.org
Locked