Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 55500 invoked from network); 21 Nov 2005 16:21:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Nov 2005 16:21:37 -0000 Received: (qmail 16453 invoked by uid 500); 21 Nov 2005 16:21:34 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 16411 invoked by uid 500); 21 Nov 2005 16:21:34 -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 16400 invoked by uid 99); 21 Nov 2005 16:21:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Nov 2005 08:21:33 -0800 Received-SPF: softfail (asf.osuosl.org: transitioning domain of psusi@cfl.rr.com does not designate 209.208.122.204 as permitted sender) Received: from [209.208.122.204] (HELO momo.creolmail.org) (209.208.122.204) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Nov 2005 08:23:06 -0800 Received: from [10.1.1.207] (unknown [69.44.168.233]) by momo.creolmail.org (Postfix) with ESMTP id 5A8CEB2F75 for ; Mon, 21 Nov 2005 11:21:12 -0500 (EST) Message-ID: <4381F407.6090606@cfl.rr.com> Date: Mon, 21 Nov 2005 11:21:27 -0500 From: Phillip Susi User-Agent: Thunderbird 1.5 (Windows/20051025) MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: Deleting the async-dev branch References: <200511201046.16378.nick@webthing.com> <43805F3D.2070709@ukf.net> <4380EBE3.5030005@cfl.rr.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Having a thread block to page in data that isn't currently in the cache is fine, as long as other threads are able to handle all the other requests. What I would really like to see is support for zero copy sends without using sendfile(). Right now I believe that apache is calling sendfile() on small chunks of data at a time, so that it can make sure the transfer is not stalled. This tends to let the pipeline stall for short periods between each sendfile() call. Also sendfile() can not be used at all to send data that is not in a file on disk. For instance, the output of a cgi script, or data that has been encrypted to send over SSL. On NT you can direct the kernel to set the send buffer size to zero ( setsockopt I think it was ) and that will prevent it from making the user->kernel copy when you send. To keep the pipeline full you just have to overlap multiple async send requests. This allows you to get sendfile() performance without its drawbacks. I hope to one day see linux and apache support this. I have wondered though, what it would be like to be able to asynchronously page fault in the cache pages to send, rather than relying on the send() call to synchronously fault in the pages if needed. That would save threads from blocking on disk IO, which might be nice. Brian Pane wrote: > The async write completion stuff that's now in the trunk does nonblocking > network writes, and it uses sendfile to do zero-copy transfer from the > filesystem > cache to the network on platforms that support it, but it doesn't try to > do file > I/O asynchronously. Thus it's possible for the current code to block on a > disk read while trying to do a nonblocking socket write. (The Event MPM > compensates for this by allowing multiple threads to do sendfile calls on > different sockets concurrently; if one thread happens to block on a > physical disk read, it doesn't delay other connections.) Having a means > of doing nonblocking filesystem I/O, via either aio or something like > mincore checks, might be a nice addition. > > Brian > >