MacOS dd timings

I need to clone a 2TB USB disk on my Mac. Going to use dd. What’s the right block size?

The bigger the better, apparently, but there are diminishing returns. “bs=128k” is good; reading from USB and writing to /dev/null that gives me 38Mbytes / second, which IIRC is about the rate for a 5400 RPM disk. 16384 gives about 20Mbytes / second. The default 512 byte blocks gives 1.2Mbytes / second.

I love that the default is 30x slower than maximum. The legacy of SysV’s 512 byte disk blocks is never going to end.

$ dd if=/dev/rdisk2 of=/dev/null bs=128k count=10000 skip=1m
10000+0 records in
10000+0 records out
1310720000 bytes transferred in 34.233990 secs (38287094 bytes/sec)

Update: that was for timing disk reads. Disk writes were slower, a test copy from one USB disk to another on my iMac showed 17 MB/s, which would take 32 hours to copy a 2TB disc. I thought at first that was because writes are slow but then I remembered the iMac is USB 2.

My Linux box has USB 3 and can read the disk at 100 MB/s. Shouldn’t have trusted my memory about disk speeds! And a copy from disk to disk on my Linux box is showing 117 MB/s, or about 5 hours to do the copy. Bonus: I trust Linux not to be doing something weird behind my back with the disks.

The full 2TB copy ended up taking about 6.5 hours, for an average rate of 85 MB/s. I forget slow the end of a disk is.