header image
Home arrow LUG How Tos arrow How To RAID USB Mass Storage Devices
How To RAID USB Mass Storage Devices Print
Article Index
How To RAID USB Mass Storage Devices
Page 2
Page 3
Page 4

The price of usb memory sticks has been dropping drastically the past couple years. Right now 2GB sticks can be found for under $30. With such cheap hardware you can use these sticks to create a high-speed solid-state disk.

Array Speed:
First, lets talk speed. Measuring raw throughput is easy. We can use the hdparm command.

Here are the results of the hdparm command on a 1GB usb memory stick:
    # hdparm -t /dev/sdc
    /dev/sdc: Timing buffered disk reads: 36 MB in 3.04 seconds = 11.85 MB/sec

Now the same command with a harddrive:
    # hdparm -t /dev/sda
    /dev/sda: Timing buffered disk reads: 174 MB in 3.03 seconds = 57.44 MB/sec

So you can see, in raw speed the usb stick is about 1/5 the speed of the hard drive. But throughput is not the only measurement of a storage device. There's also seek time. Seek time is the amount of time it takes to find the data on the disk. It is an important factor because the arm of a hard drive must physically move to the position of the data and then wait for the disk to spin around to the correct location. This takes a significant amount of time compared to everything else on the PC, and is where usb memory sticks shine. There's no moving parts, so the seek time is relatively short.

Linux doesn't come with a utility that measures seek time, but I was able to find one at Linux Insight. I ran the utility on the same hard drive and usb stick and got these results:
    USB Stick: Results: 892 seeks/second, 1.12 ms random access time
    Hard Drive: Results: 76 seeks/second, 13.06 ms random access time

As you can see, the usb stick is 11 times faster than the disk at finding data. I should mention that for the hard drive this is a worst-case scenario. We'll reduce that by 30% and say 9ms. Now, lets do a little math and see how much seek time really does help us.

Say we need a 100k (.1MB) file from the storage device.
The time it will take will be: .1MB / Speed + seek time

    USB Stick: .1MB / 12MB/sec + 1.1ms = ~9.4ms
    Hard Drive: .1MB / 60MB/sec + 9.0ms = ~10.7ms

So, a usb stick isn't that slow after all--as long as we steer away from big files. That shouldn't be a problem anyway since having large partitions of memory sticks would be cost-restrictive.

One thing we didn't measure is write speed. This is somewhat complex with usb memory sticks so we're going to skip it. Suffice to say writes might be as much as 10 times slower than reads and is one of the major caveats of memory sticks.


EC_LUG -Eau Claire Linux users group is an informal group of Linux and open source software enthusiasts.

We meet each Thursday at 7 p.m. at  420 Cafe, 420 Washington Ave. Eau Claire, Wisconsin.

Linux 101:
What's All The Fuss? video...

Mac vs. PC: How Would Linux Fit?
video1...

video2...
video3...

Linux User GroupsLug Link Logo