Re: Interesting speed benchmarks

From: Scott Long <scottl_at_samsco.org>
Date: Thu, 25 Jan 2007 23:12:38 -0700
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)
> <gave up waiting for other runs>
> 
> 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
Received on Fri Jan 26 2007 - 05:12:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:05 UTC