[patch] NSCA version 2.9 pre-forked daemon mode
Daniel Wittenberg
daniel.wittenberg.r0ko at statefarm.com
Wed Dec 7 04:06:58 CET 2011
Have you done any stress testing to see what the limitation is before it breaks down? We actually switched back to using xinetd for it for this reason. We also saw some cases where nsca would hang and take the entire process with it, so right now if that happens only 1 connection is affected. Last testing we did in this mode we could get about 725,000 connections/hour before xinetd fell over and stopped working.
Dan
-----Original Message-----
From: Michel Belleau [mailto:MBelleau at taleo.com]
Sent: Tuesday, December 06, 2011 4:41 PM
To: nagios-devel at lists.sourceforge.net
Subject: [Nagios-devel] [patch] NSCA version 2.9 pre-forked daemon mode
Hi.
I recently had the chance to look at version 2.9 of NSCA. We were originally running it in "--daemon" mode at our installation, but it looks like the daemon mode is not bounded by any means; NSCA can fork() as much as it wants (up to the socket listener limit, but that is still quite a bit of processes) to process the incoming check results and I didn't like that. I had a look at the "--single" mode of operation and from our tests results, it doesn't scale as much as we need.
I went in and modified the code a bit to implement a PREFORK mode where the NSCA daemon forks a number of processes at startup and respawns them if they exit for some errors. In my opinion, this should have better scalability than the single-threaded mode and better resources usage behavior when handling many messages per second. This is imitating the mpm_prefork worker for "httpd" a bit (much more simplistic though). This adds a new "--prefork" command-line option to NSCA.
I also think that the new "check_result_path" configuration directive is a good performance shortcut, so that is with what I tested it and it gave good results for now.
Any comments are welcome, if you want to include the patch upstream, feel free as I would be glad to have contributed to that project.
The included patch applies clean on nsca-trunk; revision 1846.
---
Michel Belleau
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
More information about the Developers
mailing list