Module: nagvis Branch: nagvis-1.4 Commit: 456f94ced07d38385f4ccd969637cb7a072f0e33 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=456f94ced07d38385f4ccd969637cb7a072f0e33
Author: LaMi <[email protected]> Date: Wed Jan 13 11:41:57 2010 +0100 #182 Added TCP_NODELAY option to MKLivestatus backend (performance tuning) --- .../includes/classes/GlobalBackendmklivestatus.php | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/nagvis/nagvis/includes/classes/GlobalBackendmklivestatus.php b/nagvis/nagvis/includes/classes/GlobalBackendmklivestatus.php index 4127852..aa7bd4d 100644 --- a/nagvis/nagvis/includes/classes/GlobalBackendmklivestatus.php +++ b/nagvis/nagvis/includes/classes/GlobalBackendmklivestatus.php @@ -183,6 +183,17 @@ class GlobalBackendmklivestatus implements GlobalBackendInterface { new GlobalFrontendMessage('ERROR', $this->CORE->LANG->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
