Slow Nagios reloads with NDOUtils
Tom Throckmorton
throck at duke.edu
Tue Nov 27 22:00:03 CET 2007
On 11/16/2007 04:23 PM, mark.potter at academy.com wrote:
> My first problem, and I am not sure it is actually a problem, is that when
> I do a reload of nagios (/etc/init.d/nagios reload) it takes, what seems
> to me to be, a long time. It is usually around 90-120 seconds for Nagios
> to start allowing use of the web interface once the reload is initiated.
Mark,
I encountered the same issue, spent a while poking at NDO and found that
tuning down the table trimming options in ndo2db.cfg helped reduce the
time of this symptom by a third or more, depending on how short of an
age I chose. This also cut the user cpu time (taken up by mysqld) by
about half, as well as the storage and I/O overhead. YMMV, of course,
but I found that at this point I don't need to keep the data in those
very busy tables longer than an hour or so - it'll be *very* useful of
course when I have an interface that can use that data, but for now,
keeping it for only a short period is fine.
IANA db expert, but from what I can tell and as Ton suggests, the table
indexing doesn't appear to be optimal - I see a high
handler_read_rnd_next count, which usually indicates unnecessary table
scans). As far as this particular symptom goes, though, I think it
might be the indexing in conjunction with the re-sending of retained
status data that's the culprit here (see the blurb on 'Do not resend
retained status to NDO' on
http://altinity.blogs.com/dotorg/2007/09/nagios-patch-da.html)
> We are monitoring:
>
> # Active Host / Service Checks:272 / 329
> This doesn't seem like enough to bog down a Dell PowerEdge 1855 with 2GB
> RAM onboard.
For comparison, I'm running one of our hosts (Nagios 2.10, ndoutils
1.4b6, MySQL 5.0.22 on CentOS 5, active hosts/services 504/2771), on a
PowerEdge 1850 w/ 2GB :) Without any ndo2db tuning, I was seeing around
a 30-second wait while the status.dat was being recreated (presumably
waiting on ndomod). After tuning, I was able to drop that time from ~30
seconds to between 6-8.
One caveat - if you do choose to trim those ages, you'll note a longer
pause after the next Nagios restart, as NDO goes about dropping older
rows. Once that's complete, be sure to optimize the relevant tables to
reclaim the unused space.
HTH,
-tt
--
Tom Throckmorton
OIT - CSI
Duke University
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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