From owner-freebsd-current@FreeBSD.ORG Fri Jan 26 06:12:57 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 27BD016A400 for ; Fri, 26 Jan 2007 06:12:57 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id C6E6813C458 for ; Fri, 26 Jan 2007 06:12:56 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id l0Q6ClRg044614; Thu, 25 Jan 2007 23:12:52 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <45B99BD6.3000709@samsco.org> Date: Thu, 25 Jan 2007 23:12:38 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: "M. Warner Losh" References: <20070125.192448.-432840241.imp@bsdimp.com> In-Reply-To: <20070125.192448.-432840241.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Thu, 25 Jan 2007 23:12:52 -0700 (MST) X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org 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 06:12:57 -0000 M. Warner Losh wrote: > On a lark, I just got a combo USB/Firewire external disk drive. I ran > some crude benchmarks, and I was surprised by what I found. This is > on a fairly stock -current kernel. > > Firewire does around 40MB/s, while USB 2.0 maxes out at about 12MB/s. > This is with a simple dd command: > > When the enclosure was attached as firewire, I got these numbers: > > dd if=/dev/da0 of=/dev/null bs=1m count=1000 > 1048576000 bytes transferred in 25.867655 secs (40536183 bytes/sec) > 1048576000 bytes transferred in 25.886887 secs (40506068 bytes/sec) > 1048576000 bytes transferred in 25.880712 secs (40515733 bytes/sec) > > when it was attached via usb (same disk): > dd if=/dev/da1 of=/dev/null bs=1m count=1000 > 1048576000 bytes transferred in 91.098764 secs (11510321 bytes/sec) > > > and for comparison (apples to oranges, I know): > > dd if=/dev/ad0 of=/dev/null bs=1m count=1000 > 1048576000 bytes transferred in 32.173160 secs (32591639 bytes/sec) > 1048576000 bytes transferred in 32.139310 secs (32625965 bytes/sec) > 1048576000 bytes transferred in 32.114549 secs (32651120 bytes/sec) > > Summary: > > firewire 40.5 MB/s Pretty much the speed I would expect. Yeah, it's not 50MB/s, but the firewire stack is under Giant so it's adding latency that is probably not optimal for getting the disk to cluster the reads. > usb 11.5 MB/s umass still bounces all I/O through a local buffer, right? That'll add a lot of latency, on top of the Giant-induced latency. > ata 32.6 MB/s Laptop drives are notoriously slow. This is a 4200RPM drive, while your firewire and USB drives are probably 5400 or 7200 RPM. It's also 2.5", so it has a smaller average linear velocity under the heads than a 3.5" drive. > > So why the huge difference? This is all the more amaizing because > 400Mb/s is 50MB/s.[*] > > Warner > > P.S. This is on my amd64 laptop, which may be why ata didn't do so > well. amd64 will only give a penalty to ATA if you have more than 4GB of RAM. Scott