Raspberry Pi: Comparing HDD Disk Read and Write Performance for external USB and SATA Drives

Performance Measurements

  • hdparm is a multifunctional tool for configuration and performance measurements, It will evaluate the disks read and write speed, as well as to access aspects like its power management capabilities and direct memory access configuration
  • dd is a command line tool for reading and writing raw device data, and can be used for tasks such as making backups of the boot sector or of the entire hard disk.

Measurement 1: 1TB USB3.0 External Disk

Read Performance

sudo hdparm -tT /dev/sda
Timing cached reads: 1590 MB in 2.00 seconds = 795.37 MB/sec
Timing buffered disk reads: 256 MB in 3.03 seconds = 84.52 MB/sec

Local Write Performance

dd bs=10M count=500 if=/dev/zero of=/home/pi/test.bin
500+0 records in
500+0 records out
5242880000 bytes (5.2 GB, 4.9 GiB) copied, 52.0089 s, 101 MB/s

Remote Write Performance

dd bs=10M count=500 if=/dev/zero of=/Volumes/share/test.bin
500+0 records in
500+0 records out
5242880000 bytes transferred in 77.964918 secs (67246656 bytes/sec)
67MB/s

Measurement 2: 512GB 2.5' SATA with USB3.0 Connection

Read Performance

sudo hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 1544 MB in 2.00 seconds = 772.31 MB/sec
Timing buffered disk reads: 258 MB in 3.00 seconds = 85.89 MB/sec

Local Write Performance

dd bs=10M count=500 if=/dev/zero of=/home/pi/test.bin
500+0 records in
500+0 records out
5242880000 bytes (5.2 GB, 4.9 GiB) copied, 63.1331 s, 83.0 MB/s

Remote Write Performance

dd bs=10M count=500 if=/dev/zero of=/run/user/1000/gvfs/smb-share:server=nexus,share=share/testbin
500+0 records in
500+0 records out
5242880000 bytes (5,2 GB, 4,9 GiB) copied, 123,337 s, 42,5 MB/s

Measurement 3: 512GB 2.5' SATA with USB2.0 Connection

Read Performance

sudo hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 1506 MB in 2.00 seconds = 753.58 MB/sec
Timing buffered disk reads: 98 MB in 3.01 seconds = 32.53 MB/sec

Local Write Performance

dd bs=10M count=500 if=/dev/zero of=/home/pi/test.bin
500+0 records in
500+0 records out
5242880000 bytes (5.2 GB, 4.9 GiB) copied, 174.322 s, 30.1 MB/s

Remote Write Performance

dd bs=10M count=500 if=/dev/zero of=/run/user/1000/gvfs/smb-share:server=nexus,share=share/testbin
^[[C500+0 records in
500+0 records out
5242880000 bytes (5,2 GB, 4,9 GiB) copied, 175,105 s, 29,9 MB/s

Comparison

Understanding Remote Write Performance Drop

  • USB 2.0 53MB/s
  • USB 3.0 500MB/s
  • SATA3 550MB/s
[ ID] Interval           Transfer     Bitrate
[ 5] 0.00-10.00 sec 1.08 GBytes 924 Mbits/sec sender
[ 5] 0.00-10.01 sec 1.07 GBytes 922 Mbits/sec receiver

Summary

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store