From owner-freebsd-hackers Sat Mar 7 23:28:55 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA18650 for freebsd-hackers-outgoing; Sat, 7 Mar 1998 23:28:55 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id XAA18642; Sat, 7 Mar 1998 23:28:49 -0800 (PST) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id GAA04603; Sun, 8 Mar 1998 06:58:29 +0100 From: Luigi Rizzo Message-Id: <199803080558.GAA04603@labinfo.iet.unipi.it> Subject: Re: kernel wishlist for web server performance To: mike@smith.net.au (Mike Smith) Date: Sun, 8 Mar 1998 06:58:29 +0100 (MET) Cc: marcs@znep.com, dyson@FreeBSD.ORG, hackers@FreeBSD.ORG In-Reply-To: <199803080557.VAA08664@dingo.cdrom.com> from "Mike Smith" at Mar 7, 98 09:57:36 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > 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