From owner-freebsd-net Thu Feb 1 17: 3: 1 2001 Delivered-To: freebsd-net@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id AA38B37B491 for ; Thu, 1 Feb 2001 17:02:43 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f1212EW05308; Thu, 1 Feb 2001 17:02:14 -0800 (PST) Date: Thu, 1 Feb 2001 17:02:14 -0800 From: Alfred Perlstein To: Tony Finch Cc: David Xu , Kris Kennaway , bsddiy , freebsd-net@FreeBSD.ORG Subject: Re: sendfile() Message-ID: <20010201170214.V26076@fw.wintelcom.net> References: <1217774688.20010201133139@163.net> <20010201023825.A71975@xor.obsecurity.org> <20010201180010.Q70673@hand.dotat.at> <001d01c08cb1$9c445d80$6201a8c0@William> <20010202005018.Y70673@hand.dotat.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010202005018.Y70673@hand.dotat.at>; from dot@dotat.at on Fri, Feb 02, 2001 at 12:50:18AM +0000 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org * Tony Finch [010201 16:52] wrote: > David Xu wrote: > > > >but as I know, it seems TCP_NOPUSH is mainly used for TTCP, right? > > That's what it was designed for. > > >the idea behind TCP_CORK is it buffers any small data segment user > >program sending until these segments full fills a max TCP packet, > >then the packet is sent, > > TCP_NOPUSH is the same > > >web servers always send many very small HTTP headers, cause lots of > >small packets sent out, TCP_CORK can increase network performance. > > No, web servers are very careful to reduce the number of packets > required for a response. TCP_CORK exists to avoid two bad packet > boundaries per request: one between the header and the body, and one > between the body and the next response. FreeBSD's sendfile allows you > to easily optimise the beginning of the response; optimising the > transition from one response to the next is harder. I was going to say the same thing, but what about the header before a cgi response? Doesn't the webserver need to spit out a couple of short lines before exec'ing the CGI? Wouldn't the socket low water mark address this though as long as it was > size of the http header? -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message