I'm using an external USB 2.0 HDD to extend the storage of the Pi which holds my movie-collection.

I'm experiencing problems with skips when playing HD movies (720p / 1080p). Also, when transferring files to the HDD (per SFTP, 100MB/s wired connection) I don't get over 700kb/s, but when transferring files to the SD-Card (class 4), I get 2-3MB/s.

Some information about the HDD:

  • USB 2.0
  • 500GB
  • Ext3

So, I'm looking for something to benchmark the external HDD. I had a look at hdparm, but it seems to only work with SATA/IDE devices. Is there something I can use to benchmark the external USB HDD?

  • Is it possible the files are highly fragmented? This can happen if they are downloaded as torrents without preallocating the file. Jan 3, 2013 at 6:15

1 Answer 1


To measure the sequential read or write speed, you can use dd. Write speed:

dd if=/dev/zero of=test.tst bs=4096 count=100000

Read speed:

dd if=test.tst of=/dev/null bs=4096 count=100000

then remove the test file:

rm test.tst

Measuring is tricky, writing small files will get a benefit from caching in RAM, and when reading the data may be in RAM already if the file has recently been read before. Therefore, perform the tests with files larger than the amount of RAM you have.

For more varied tests you can use the iozone tool, it tests the effects of various block sizes and access patterns. SD cards in particular are much better at sequential writes than random writes in small blocks. Brief instructions for compiling iozone, and some ramblings on benchmarking.

SFTP takes a lot of CPU power for the encryption, and can be slow also for that reason. Some unencrypted protocol would be faster, samba works well for me. In this question about SFTP performance, it is suggested to use the latest firmware on the Pi, an update (roughly October 2012) improved the USB transfer speed.

In general, the file system matters for the performance, for example writing to NTFS is CPU intensive and slow on the Pi. Two things to try for higher performance:

  • mount the disk with the noatime option.

  • turn journaling off - this is of course less safe in the event of a power loss but reduces the amount of data to be written.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.