OSX dd Dead Slow

I’ve been writing to SD cards a bit lately while mucking around with a Raspberry Pi and a few other boards. This involves using dd to write a disk image directly onto the SD card. Whenever I do this, it is very slow. I mean really slow. I began to suspect the OSX implementation of dd and tonight I tested it out.

Here is a write of an image (Fedora for a Cubieboard) on my mac
sudo dd if=~/Downloads/Fedora-18-a10-armhfp-r1-cubie.img of=/dev/disk8 bs=64k
49152+0 records in
49152+0 records out
3221225472 bytes transferred in 1625.948833 secs (1981136 bytes/sec)

I then started an Ubuntu VM on VMWare on the same mac and repeated the operation

I was having a terrible time trying to copy a large image to a USB stick using dd in OSX (Yosemite). After a few attempts with various different options, I decided to see if I could download, install and configure VirtualBox and Ubuntu and get it to the point where I could do the above before the native OSX dd could finish. After about an hour of letting it copy a 3.9GB file, I had my new Ubuntu VM running. The dd in the native OSX was still running. I canceled it to discover that I was only getting around 200kb/sec. Ridiculous.

I retried it in Ubuntu – a VM inside the native machine – and I’m getting 6MB/s!! Still not breaking any records for USB writing, but it’s still THIRTY (30!) times faster than through the native OSX.

As was said before: use of=/dev/rdisk and NOT of=/dev/disk on OS X because rdisk is much, much faster (usually as fast as the device is able to write).
No need to go to Linux, just add the “r” in front of disk for your output!