Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Aug 1998 18:17:34 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        marcs@znep.com (Marc Slemko)
Cc:        tlambert@primenet.com, hackers@FreeBSD.ORG
Subject:   Re: sendfile() API?
Message-ID:  <199808171817.LAA06770@usr08.primenet.com>
In-Reply-To: <Pine.GSO.4.02A.9808162329430.26956-100000@redfish> from "Marc Slemko" at Aug 16, 98 11:31:55 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808171817.LAA06770>