Module: nagvis Branch: master Commit: e655765b5f08a2f0029fd733b9079edf9e9b685d URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=e655765b5f08a2f0029fd733b9079edf9e9b685d
Author: LaMi <[email protected]> Date: Wed Jan 13 11:41:57 2010 +0100 #182 Added TCP_NODELAY option to MKLivestatus backend (performance tuning) --- .../core/classes/GlobalBackendmklivestatus.php | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/share/server/core/classes/GlobalBackendmklivestatus.php b/share/server/core/classes/GlobalBackendmklivestatus.php index c052128..d0edf77 100644 --- a/share/server/core/classes/GlobalBackendmklivestatus.php +++ b/share/server/core/classes/GlobalBackendmklivestatus.php @@ -180,6 +180,17 @@ class GlobalBackendmklivestatus implements GlobalBackendInterface { new GlobalMessage('ERROR', GlobalCore::getInstance()->getLang()->getText('Unable to connect to the [SOCKET] in backend [BACKENDID]: [MSG]', Array('BACKENDID' => $this->backendId, 'SOCKET' => $this->socketPath, 'MSG' => socket_strerror(socket_last_error($this->SOCKET))))); return Array(); } + + // Maybe set some socket options + if($this->socketType === 'tcp') { + // Disable Nagle's Alogrithm - Nagle's Algorithm is bad for brief protocols + if(defined('TCP_NODELAY')) { + socket_set_option($this->SOCKET, SOL_TCP, TCP_NODELAY, 1); + } else { + // See http://bugs.php.net/bug.php?id=46360 + socket_set_option($this->SOCKET, SOL_TCP, 1, 1); + } + } } /** ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
