From owner-freebsd-hackers Sun Mar 8 22:03:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA09621 for freebsd-hackers-outgoing; Sun, 8 Mar 1998 22:03:03 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from scanner.worldgate.com (scanner.worldgate.com [198.161.84.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA09603 for ; Sun, 8 Mar 1998 22:02:48 -0800 (PST) (envelope-from marcs@znep.com) Received: from znep.com (uucp@localhost) by scanner.worldgate.com (8.8.7/8.8.7) with UUCP id XAA14495; Sun, 8 Mar 1998 23:02:13 -0700 (MST) Received: from localhost (marcs@localhost) by alive.znep.com (8.7.5/8.7.3) with SMTP id XAA11909; Sun, 8 Mar 1998 23:00:20 -0700 (MST) Date: Sun, 8 Mar 1998 23:00:20 -0700 (MST) From: Marc Slemko To: "M. Warner Losh" cc: hackers@FreeBSD.ORG Subject: Re: kernel wishlist for web server performance In-Reply-To: <199803090515.WAA04129@pencil-box.village.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 8 Mar 1998, M. Warner Losh wrote: > In message <199803080554.VAA08633@dingo.cdrom.com> Mike Smith writes: > : I appreciate the conceptual niceness of what you're describing, but I > : guess I'm not convinced that something like that would be worth the > : cruft and effort involved. > > On most modern systems that I've played with, copy avoidance doesn't > really help much at all. bcopy and friends run at about 50-75MB/s, > while most networking and/or disk protocols are lucky to get into the > 5-10M range (sustained). the copies that you are avoiding don't > really hurt much and would be difficult to measure for most > applications. I have had great difficulty speeding up a driver that I > wrote for Solaris by eliminating some bcopy() calls. They tend not to > be all that important for most applications.[*] > > Warner > > [*] if you are still running on 25MHz processors in embedded systems > or on really slow hardware, this statement is completely bogus... > A pair of HP 9000 Series X30 machines. FDDI. No copy avoidance, ~1% free CPU while sending. Copy avoidance, ~45% free CPU while sending. Throughput didn't go up that much though, but that's probably due to other bottlenecks. These numbers are quoted from the HP paper I referenced earlier. I consider that sort of improvement in free CPU very worthwhile. Taking advantage of cards' built in checksum methods also gives you a decent gain. If you can use copy avoidance, you also save memory. Instead of needing say 64k of data in the socket buffers for each connection, you can actually end up sharing a lot of it between connections and the buffer cache if you have a reasonable amount of memory for your dataset. This is contrasted to having to have multiple copies of data, so you can end up having a smaller buffer cache, so you start having to hit the disks more. You also gain from simplicity of implementation in your application program because it doesn't have to keep coming back to transfer another chunk of the file, etc. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message