Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 83937 invoked from network); 22 Aug 2005 13:52:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Aug 2005 13:52:54 -0000 Received: (qmail 78802 invoked by uid 500); 22 Aug 2005 13:52:48 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 78736 invoked by uid 500); 22 Aug 2005 13:52:48 -0000 Mailing-List: contact dev-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 dev@httpd.apache.org Received: (qmail 78723 invoked by uid 99); 22 Aug 2005 13:52:48 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2005 06:52:48 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jorton@redhat.com designates 66.187.233.31 as permitted sender) Received: from [66.187.233.31] (HELO mx1.redhat.com) (66.187.233.31) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2005 06:53:05 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j7MDqj9r027779 for ; Mon, 22 Aug 2005 09:52:45 -0400 Received: from radish.cambridge.redhat.com (radish.cambridge.redhat.com [172.16.18.90]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j7MDqiV20284 for ; Mon, 22 Aug 2005 09:52:44 -0400 Received: (from jorton@localhost) by radish.cambridge.redhat.com (8.13.4/8.13.4/Submit) id j7MDqcWD028083 for dev@httpd.apache.org; Mon, 22 Aug 2005 14:52:38 +0100 X-Authentication-Warning: radish.cambridge.redhat.com: jorton set sender to jorton@redhat.com using -f Date: Mon, 22 Aug 2005 14:52:38 +0100 From: Joe Orton To: dev@httpd.apache.org Subject: Re: TCP_CORK in Linux 2.6: not broken, but it doesn't work with TCP_NODELAY Message-ID: <20050822135238.GC25876@redhat.com> Mail-Followup-To: dev@httpd.apache.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Sun, Aug 21, 2005 at 04:25:19PM -0700, Brian Pane wrote: > I've attached my test program in case it's useful to others. It's > run as > sendfile_test [--cork] [--nodelay] [--nonblock] filename > listener_port_number. This is rather useful, thanks Brian. I think you're missing the fact that 2.0 never actually tries to enable both TCP_CORK *and* TCP_NODELAY - this wasn't possible with a 2.4 kernel, the second setsockopt call would fail. APR knows not to try this and toggles NODELAY off when CORK is enabled. With the FC4 2.6.12-ish kernel I am seeing: - stuff sent by httpd fails to cork properly; partial frames are sent ... i.e. what Greg reported. - stuff sent by your test case *does* get corked properly; the partial header frame is suppressed; using "--cork --nonblock", which *should* be equivalent to what httpd does. so I think there is something subtle here. Comments in the 2.6 kernel source imply that TCP_CORK and TCP_NODELAY should actually be usable together than that TCP_CORK would trump TCP_NODELAY. But this isn't what httpd is trying, so maybe should be treated as a separate issue for now. joe