Verify hard drive write speed using dd
This quick benchmark verifies a remote USB HDD is performing as USB 3. A malfunctioning drive may show as USB 3 in USBview, yet write at USB 2 speeds. This technique works on Linux, Mac, Cygwin, and Windows Subsystem for Linux.
Typical USB HDD write speed:
- USB 2 hard limit: 60 MB/s by the 480 Mb/s raw USB 2 speed.
- real-world USB 2 HDD speed: 30-40 MB/s sequential write
In contrast, USB 3 HDD are limited by the magnetic hard drive speed with today’s hard drives, provided your chipset drivers aren’t messed up. If Windows fails to load the USB 3 drivers for an HDD the drive operates at USB 2 speeds, which is easily detected with this test. Because of numerous caches from the CPU to the drive itself, using a simple method like this will not give precise results.
Write speed for big files is a test of sequential write speed. Sequential write speed is important for many remote sensing problems, which are by definition often a time series of data.
dd if=/dev/zero of=/tmp/junk bs=1G count=4 oflag=dsync
That command writes 4 GB sequentially.
- USB 3 HDD: > 80-100 MB/s
- USB 2 HDD: < 60 MB/s
We have not yet determined a way to get a usable estimate of read speed with
dsync, etc. options don’t seem to work on read.
For better drive benchmarks, consider bonnie++
apt install bonnie++