From owner-freebsd-current@FreeBSD.ORG Fri Jan 26 03:15:55 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 CA34216A4EC for ; Fri, 26 Jan 2007 03:15:55 +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 8B7EF13C4A3 for ; Fri, 26 Jan 2007 03:15:55 +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 l0Q2OOCE034475 for ; Thu, 25 Jan 2007 19:24:26 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 25 Jan 2007 19:24:48 -0700 (MST) Message-Id: <20070125.192448.-432840241.imp@bsdimp.com> To: current@freebsd.org From: "M. Warner Losh" 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]); Thu, 25 Jan 2007 19:24:26 -0700 (MST) Cc: Subject: 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 03:15:55 -0000 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 usb 11.5 MB/s ata 32.6 MB/s 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. P.P.S: ad0: 114473MB at ata0-master UDMA100 firewire: da0: Fixed Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 194481MB (398297088 512 byte sectors: 255H 63S/T 24792C) usb: da1: Fixed Direct Access SCSI-0 device da1: 40.000MB/s transfers da1: 194481MB (398297088 512 byte sectors: 255H 63S/T 24792C) P.P.P.S. M == 10^6 here.