posted on 09:43 PM on Tuesday 28 January 2020
Wondered how fast the various disk options are on the Mac. So I did a little test using dd for writing since it was available on Linux and Mac.
First up is the internal SSD of a MacBook Pro (15-inch 2019).
time sh -c "dd if=/dev/zero of=test bs=1g count=10 && sync" 10+0 records in 10+0 records out 10737418240 bytes transferred in 6.449485 secs (1664848920 bytes/sec) real 0m6.801s user 0m0.003s sys 0m4.580s
So 1506 MB/s write speed which is very very impressive.
Next up is the WD 4TB USB hard drive connect to the same MacBook Pro.
time sh -c "dd if=/dev/zero of=test bs=1g count=10 && sync" 10+0 records in 10+0 records out 10737418240 bytes transferred in 118.254275 secs (90799409 bytes/sec) real 1m58.825s user 0m0.003s sys 0m5.544s
This translated to about 86 MB/s which means that the MacBook Pro is 18 times faster which is ridiculous.
Moving on to the Linux server with its 8x6TB ZFS.
time sh -c "dd if=/dev/zero of=test bs=1G count=10 oflag=dsync && sync" 10+0 records in 10+0 records out 10737418240 bytes (11 GB, 10 GiB) copied, 34.4002 s, 312 MB/s real 0m39.161s user 0m0.008s sys 0m10.626s
Not bad at 261 MB/s, about 1/6 of the speed of the MacBook Pro’s SSD. Not too bad.
Moving to the internal SATA Samsung 860 EVO SSD.
time sh -c "dd if=/dev/zero of=test bs=1G count=10 oflag=dsync && sync" 10+0 records in 10+0 records out 10737418240 bytes (11 GB, 10 GiB) copied, 6.01736 s, 1.8 GB/s real 0m11.691s user 0m0.003s sys 0m6.799s
So that is about 876 MB/s which is plenty fast, about half of the speed of the MacBook Pro.
And lastly an old Samsung 850 EVO SATA SSD connected via USB.
time sh -c "dd if=/dev/zero of=test bs=1G count=10 oflag=dsync && sync" 10+0 records in 10+0 records out 10737418240 bytes (11 GB, 10 GiB) copied, 50.5551 s, 212 MB/s real 0m54.865s user 0m0.004s sys 0m11.396s
That is about 187 MB/s which is not too bad, definitely in USB 3.0 range.
Tried it on the work iMac (Retina 5K, 27-inch, Late 2014) too.
time sh -c "dd if=/dev/zero of=test bs=1g count=10 && sync" 10+0 records in 10+0 records out 10737418240 bytes transferred in 27.654730 secs (388266969 bytes/sec) real 0m28.034s user 0m0.003s sys 0m7.002s
That works out to 365 MB/s which is quite different compared to a modern Mac like the MacBook Pro.
Using a SanDisk Extreme Pro 128GB thumb drive on the iMac with a USB 3 5 Gb/s connection (500 MB/s).
time sh -c "dd if=/dev/zero of=test bs=1g count=10 && sync" 10+0 records in 10+0 records out 10737418240 bytes transferred in 30.610137 secs (350779817 bytes/sec) real 0m31.575s user 0m0.003s sys 0m6.592s
The thumb drive is pretty fast at 324 MB/s which is about as fast as the internal SSD on the iMac.
Next up is a SanDisk Extreme Portable SSD connected to the MacBook Pro.
time sh -c "dd if=/dev/zero of=test bs=1g count=10 && sync" 10+0 records in 10+0 records out 10737418240 bytes transferred in 21.986881 secs (488355680 bytes/sec) real 0m24.541s user 0m0.003s sys 0m5.322s
That is a transfer speed of 417 MB/s which is really quite fast for a portable drive. It has definitely benefited from the USB 3.1 Gen 2 which provides a 10 Gb/s connection.
computer