From owner-freebsd-current@FreeBSD.ORG Fri Jan 26 16:31:41 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B5E0C16A402; Fri, 26 Jan 2007 16:31:41 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 595C213C494; Fri, 26 Jan 2007 16:31:41 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id l0QGSF0I046531; Fri, 26 Jan 2007 09:28:16 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 26 Jan 2007 09:28:42 -0700 (MST) Message-Id: <20070126.092842.1973603551.imp@bsdimp.com> To: cperciva@freebsd.org From: "M. Warner Losh" In-Reply-To: <45B99A59.6070902@freebsd.org> References: <45B9895B.9020709@freebsd.org> <20070125.224642.353412237.imp@bsdimp.com> <45B99A59.6070902@freebsd.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Fri, 26 Jan 2007 09:28:16 -0700 (MST) Cc: current@freebsd.org Subject: Re: Interesting speed benchmarks X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2007 16:31:41 -0000 In message: <45B99A59.6070902@freebsd.org> Colin Percival writes: : M. Warner Losh wrote: : > In message: <45B9895B.9020709@freebsd.org> : > Colin Percival writes: : > : M. Warner Losh wrote: : > : > Firewire does around 40MB/s, while USB 2.0 maxes out at about 12MB/s. : > : : > : I get 25MB/s from my Vantec Nexstar3 : > : USB 2.0 enclosure: : > : : > : http://www.daemonology.net/blog/2006-01-28-vantex-nexstar3.html : > : > Still, 25MB/s is no 40MB/s... : : Sure, but it means that the performance issues aren't simply a global "USB 2.0 : is bad". What does `diskinfo -c` say about your firewire and USB interfaces? Actually, I think it does mean exactly that. At least with our code base and the hardware I have access to. I tested another enclosures on my amd64 laptop running current and my i386 laptop running 6.2R (+ current cardbus) and found similar results. 6.2R on i386 was even slower, despite the laptop being a 3GHz pentium. I got similar results with a cardbus usb2.0 card as I did with the built-in usb 2.0 ports. diskinfo -c tells me that usb is 3 times slower per block, and has a 6 times higher command overhead. Firewire is faster than local ata, but has a 20% higher command overhead. usb: I/O command overhead: time to read 10MB block 0.971377 sec = 0.047 msec/sector time to read 20480 sectors 15.577325 sec = 0.761 msec/sector calculated command overhead = 0.713 msec/sector firewire: I/O command overhead: time to read 10MB block 0.299125 sec = 0.015 msec/sector time to read 20480 sectors 2.804367 sec = 0.137 msec/sector calculated command overhead = 0.122 msec/sector ata: (this is a different disk) ad0 I/O command overhead: time to read 10MB block 0.346256 sec = 0.017 msec/sector time to read 20480 sectors 2.249805 sec = 0.110 msec/sector calculated command overhead = 0.093 msec/sector usb 2.0 shouldn't be this slow, and I think it points to our usb code being poor at something that's introducing a huge overhead into commands, as well as creating greater overhead on long transfers. It has been suggested that the limited scatter gather in the usb code might be causing some of the problems. I haven't tested the Hans Petter Selasky usb stack to see if it is any better. It appears there's no scatter gather there, so that might make the numbers even worse. But if the command queueing is better, then it might make up for it. Warner