slothsoffun
4/18/2018 - 5:28 PM

Disk I/O Performance Test

Read and write I/O

#! /bin/bash


# Test read speeds

sudo hdparm -t /dev/sda2 # direct read
sudo hdparm -T /dev/sda2 # cached read

## run 2-3x to get an average!

# Test write speeds (mount volume first!)
# If disk has no FS yet => of=/dev/sda2

dd if=/dev/zero of=/Volumes/mounted_disk/test_file bs=8k count=10k; rm -f /Volumes/mounted_disk/test_file