Date: Sun, 16 Aug 1998 12:35:36 -0700 (PDT) From: Marc Slemko <marcs@znep.com> To: Andre Oppermann <oppermann@pipeline.ch> Cc: hackers@FreeBSD.ORG Subject: Re: sendfile() API? Message-ID: <Pine.GSO.4.00.9808161228020.7948-100000@redfish> In-Reply-To: <35D7292D.7FBBA95@pipeline.ch>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 16 Aug 1998, Andre Oppermann wrote: > I'm currently evaluating the Zeus 3.1 Webserver (it finally available > for FreeBSD: www.zeus.co.uk) and in the tuning document they talk about > an sendfile() API which is currently only supportet on HP/UX 11.00: > http://support.zeus.co.uk/tuning.htm > > I'm now wondering what exactly that is and if someone has more details > or documents on that. It is a system call that allows you to pass in a file descriptor and a network socket and some other stuff. The kernel can then figure out how it can best shove the file to the network without having to copy into userspace. It still may or may not have to copy in the kernel, depending on implementation. There is a man page for the HPUX sendfile() at: http://docs.hp.com:80/dynaweb/hpux11/hpuxen1a/rvl3en1a/@Generic__BookTextView/59894;td=3 Note that the HPUX implementation does have some problems with the semantics, you really need an async sendfile() to do things right without wasting threads, you really need to be able to pass multiple headers and trailers in to do things right, etc. > > They state sendfile() gives excellent Webserver performace, isn't that > somthing for FreeBSD? sendfile() gives pretty good performance when combined with a file descriptor cache (ie. the web server doesn't do anything silly like cache data, it just keeps a bunch of descriptors open to sendfile() on), but the implementation has to be right and it is really an interm solution. The more general concept is any descriptor to any descriptor, and the future for web server performance could involve a small, in-kernel HTTP engine (eg. IBM's AFPA) backed by a webserver that handles cache population and any request that requires thinking plus if HTTP-NG becomes a reality (which it may well not since the W3C is shoving all sorts of "distributed object" crap into it; MUX may end up being deployed seperately though...), multiplexing multiple transfers over a single socket with MUX will mean that you can't use a sendfile() that usefully anyway. 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?Pine.GSO.4.00.9808161228020.7948-100000>