From owner-freebsd-hackers Mon Aug 17 11:18:49 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA15973 for freebsd-hackers-outgoing; Mon, 17 Aug 1998 11:18:49 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp02.primenet.com (smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA15907 for ; Mon, 17 Aug 1998 11:18:38 -0700 (PDT) (envelope-from tlambert@usr08.primenet.com) Received: (from daemon@localhost) by smtp02.primenet.com (8.8.8/8.8.8) id LAA22654; Mon, 17 Aug 1998 11:17:48 -0700 (MST) Received: from usr08.primenet.com(206.165.6.208) via SMTP by smtp02.primenet.com, id smtpd022620; Mon Aug 17 11:17:41 1998 Received: (from tlambert@localhost) by usr08.primenet.com (8.8.5/8.8.5) id LAA06770; Mon, 17 Aug 1998 11:17:34 -0700 (MST) From: Terry Lambert Message-Id: <199808171817.LAA06770@usr08.primenet.com> Subject: Re: sendfile() API? To: marcs@znep.com (Marc Slemko) Date: Mon, 17 Aug 1998 18:17:34 +0000 (GMT) Cc: tlambert@primenet.com, hackers@FreeBSD.ORG In-Reply-To: from "Marc Slemko" at Aug 16, 98 11:31:55 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > I would also hate to have to edit CRLF into all of my WWW pages, > > which would be required. 8-(. > > You seem to think that web servers do line ending transformation while > they are sending. They (speaking in general for every server I have used) > don't. > > If you have to perform arbitrary data translations, I am doubtful that > there is much room for an improved API. However, in a lot of cases you > don't. I have no doubt that it would be useful for static pages; I am just not convinced that pushing the data over a call boundary is the real overhead here. For an mmap'ed file, the only overhead is the copy from the VM buffer to the mbuf. The only way such a call could eliminated this overhead is by passing the VM buffers down as mbuf contents. This can be done (I did the code for it on the VMS NetWare server), but it's a lot of work. I have found that running a cgi that invokes "team" or "ddd" to overlap I/O does a much better job of pushing content, especially images, fast. The bottleneck is the network I/O capacity, not the read-from-disk capacity. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message