[Nagios-devel] [patch] NSCA version 2.9 pre-forked daemon mode

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] [patch] NSCA version 2.9 pre-forked daemon mode

Post by Guest »

Have you done any stress testing to see what the limitation is before it br=
eaks down? We actually switched back to using xinetd for it for this reaso=
n. We also saw some cases where nsca would hang and take the entire proces=
s with it, so right now if that happens only 1 connection is affected. Las=
t testing we did in this mode we could get about 725,000 connections/hour b=
efore xinetd fell over and stopped working.

Dan


-----Original Message-----
From: Michel Belleau [mailto:[email protected]]=20
Sent: Tuesday, December 06, 2011 4:41 PM
To: [email protected]
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 originall=
y 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 want=
s (up to the socket listener limit, but that is still quite a bit of proces=
ses) 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 doe=
sn'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 th=
ey exit for some errors. In my opinion, this should have better scalability=
than the single-threaded mode and better resources usage behavior when han=
dling many messages per second. This is imitating the mpm_prefork worker fo=
r "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 goo=
d results for now.

Any comments are welcome, if you want to include the patch upstream, feel f=
ree as I would be glad to have contributed to that project.
The included patch applies clean on nsca-trunk; revision 1846.

---
Michel Belleau






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: ichel Belleau [mailto:[email protected]]=2
Locked