Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 22339 invoked from network); 3 Aug 2007 15:58:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Aug 2007 15:58:03 -0000 Received: (qmail 18579 invoked by uid 500); 3 Aug 2007 15:58:02 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 18520 invoked by uid 500); 3 Aug 2007 15:58:02 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 18509 invoked by uid 99); 3 Aug 2007 15:58:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 08:58:02 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 15:57:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 88A6A1A981A; Fri, 3 Aug 2007 08:57:29 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r562510 - in /httpd/httpd/trunk: CHANGES modules/proxy/mod_proxy_ftp.c modules/proxy/proxy_util.c Date: Fri, 03 Aug 2007 15:57:28 -0000 To: cvs@httpd.apache.org From: jim@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070803155729.88A6A1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jim Date: Fri Aug 3 08:57:27 2007 New Revision: 562510 URL: http://svn.apache.org/viewvc?view=rev&rev=562510 Log: *) mod_proxy: Improve network performance by setting APR_TCP_NODELAY (disable Nagle algorithm) on sockets if implemented. PR 42871 [Christian BOITEL , Jim Jagielski] Modified: httpd/httpd/trunk/CHANGES httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c httpd/httpd/trunk/modules/proxy/proxy_util.c Modified: httpd/httpd/trunk/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?view=diff&rev=562510&r1=562509&r2=562510 ============================================================================== --- httpd/httpd/trunk/CHANGES [utf-8] (original) +++ httpd/httpd/trunk/CHANGES [utf-8] Fri Aug 3 08:57:27 2007 @@ -2,6 +2,10 @@ Changes with Apache 2.3.0 [Remove entries to the current 2.0 and 2.2 section below, when backported] + *) mod_proxy: Improve network performance by setting APR_TCP_NODELAY + (disable Nagle algorithm) on sockets if implemented. + PR 42871 [Christian BOITEL , Jim Jagielski] + *) mod_info: mod_info outputs invalid XHTML 1.0 transitional. PR 42847 [Rici Lake ] Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c?view=diff&rev=562510&r1=562509&r2=562510 ============================================================================== --- httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c (original) +++ httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c Fri Aug 3 08:57:27 2007 @@ -1233,6 +1233,12 @@ } #endif + rv = apr_socket_opt_set(data_sock, APR_TCP_NODELAY, 1); + if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, + "apr_socket_opt_set(APR_TCP_NODELAY): Failed to set"); + } + /* make the connection */ apr_socket_addr_get(&data_addr, APR_REMOTE, sock); apr_sockaddr_ip_get(&data_ip, data_addr); @@ -1320,6 +1326,12 @@ "proxy: FTP: apr_socket_opt_set(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default"); } #endif + + rv = apr_socket_opt_set(data_sock, APR_TCP_NODELAY, 1); + if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, + "apr_socket_opt_set(APR_TCP_NODELAY): Failed to set"); + } /* make the connection */ apr_sockaddr_info_get(&pasv_addr, apr_psprintf(p, "%d.%d.%d.%d", h3, h2, h1, h0), connect_addr->family, pasvport, 0, p); Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?view=diff&rev=562510&r1=562509&r2=562510 ============================================================================== --- httpd/httpd/trunk/modules/proxy/proxy_util.c (original) +++ httpd/httpd/trunk/modules/proxy/proxy_util.c Fri Aug 3 08:57:27 2007 @@ -1530,6 +1530,13 @@ } #endif + rv = apr_socket_opt_set(*newsock, APR_TCP_NODELAY, 1); + if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) { + ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, + "apr_socket_opt_set(APR_TCP_NODELAY): " + "Failed to set"); + } + /* Set a timeout on the socket */ if (conf->timeout_set == 1) { apr_socket_timeout_set(*newsock, conf->timeout); @@ -2156,6 +2163,13 @@ "ProxyReceiveBufferSize, using default"); } #endif + + rv = apr_socket_opt_set(newsock, APR_TCP_NODELAY, 1); + if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) { + ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, + "apr_socket_opt_set(APR_TCP_NODELAY): " + "Failed to set"); + } /* Set a timeout on the socket */ if (worker->timeout_set == 1) {