Date: Sun, 8 Mar 1998 06:58:29 +0100 (MET) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: mike@smith.net.au (Mike Smith) Cc: marcs@znep.com, dyson@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: kernel wishlist for web server performance Message-ID: <199803080558.GAA04603@labinfo.iet.unipi.it> In-Reply-To: <199803080557.VAA08664@dingo.cdrom.com> from "Mike Smith" at Mar 7, 98 09:57:36 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > Give it a file descriptor. Give it a socket. Give it some header and > > trailer info. The contents of the header, the descriptor, then the > > trailer magically go to the network without having to diddle around trying > > to do copy avoidance in the kernel between write and the socket buffers. > using mmap, right now i think you have two copies, one from the write to the socket buffer, the other one when assembling the output packet from the socket buffer in a form that can be directly DMA-ed by the network card. I don't think it is trivial to save both copies without heavy dependencies on the network adapter and considering that you don't know beforehand how big your packets will have to be (ok, in 90% of the cases you know, assuming you don't hit patological situations with window sizes etc.) Furthermore, consider that on modern machines these copies might run at some 250Mbytes/s or faster, i.e. one order of magnitude faster than network/disk speed. All in all, i don't think it is worth the effort. cheers luigi -----------------------------+-------------------------------------- Luigi Rizzo | Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it | Universita' di Pisa tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ _____________________________|______________________________________ 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?199803080558.GAA04603>