Simple speed test for storage devices

Here’s a quick and dirty way to see how fast it takes a storage device to write, and later read, a 2 GB test file.

Write a 2 GB test file unimaginatively named “test” and report the time it took:

dd if=/dev/zero of=/path-to-device/test bs=1048576 count=2048

Read the test file and report the time it took:

dd if=/path-to-device/test of=/dev/null bs=1048576

There’s nothing wrong with the ever-popular hdparm command on Linux, but I like dd because I need to do this on Mac, too. Apropos that, here’s a reminder of where external devices are usually mounted:

  • On Linux: /run/media/$USER/DEVICE-NAME
  • On Mac: /Volumes/DEVICE-NAME

Recall that hardware matters. The same command performed on the same hard disk clocked in at 17 seconds on a recent computer and 54 seconds on a twelve year old box.

About Warren Post

So far: Quality Assurance crash test dummy, jungle guide, tech support monkey, entrepreneur, IT consultant, teacher, beach bum, diplomat, over-enthusiastic cyclist.
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a comment