[patch] NSCA version 2.9 pre-forked daemon mode

Michel Belleau MBelleau at taleo.com
Tue Dec 6 23:41:26 CET 2011


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: nsca_29-prefork.patch
Type: application/octet-stream
Size: 6553 bytes
Desc: nsca_29-prefork.patch
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20111206/69681c77/attachment.obj>
-------------- next part --------------
------------------------------------------------------------------------------
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/
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list