ddrescue extremely slow on USB hard drive

This would seem to just been how ddrescue & USB transfers work under OSX. From this thread titled: Subject: [Bug-ddrescue] ddrescue 10x slow under osx.

when working on fully functional hard drives, under linux it performs full i/o speed. when compiled under osx with the default compile flags, it is magnitude times slower, sometimes crawling to Kb/s. the problem persists if the output file is /dev/null.

That same thread also had this response.

In my experience and testing on OS X, accessing the raw character devices /dev/rdisk… is always preferable. Also the transfer speed can be further enhanced by setting a bigger Copy Block Size. A size of 512KiB (ddrescue -c 1Ki) gave me the best results in most cases.

And: OS X raw character devices DO have a defined size, so they can be easily used even in the first run. (At least in this point the notes about raw devices in the existing documentation for ddrescue do not apply to OS X.)

I don't think this is a bug in ddrescue, because other utilities like dd or cat exhibit the same behavior on OS X.

Accessing a /dev/disk… block device gives a rather slow speed, independent of the Copy Block Size used. The reading speed of a /dev/rdisk… raw character device on the other hand depends a lot on the Copy Block Size chosen:

  • 512 Byte (ddrescue -c 1, default in dd) is the slowest.
  • Setting it to 4096 Byte (ddrescue -c 8, dd bs=4K) gives the same slow speed as accessing /dev/disk…
  • ddrecue's default of 128 sectors (= 64KiB, ddrescue -c 128, dd bs=64K) brings fairly good results.
  • Multiplying that further (up to ddrescue -c 1Ki / dd bs=512K) brings maximum speed (mostly 8-12 times faster than /dev/disk…)
  • Rising above that did not increase transfer speed any further in my testing; sometimes it even decreased.

Those are the results of my own measurements, your results may vary depending on the media and IO hardware used. Maybe if some other users would share their experience, we could gain a better picture of the topic.

References

  • ddrescue has slowed down massively on os x
  • GNU DDrescue, am I doing it right? [slow / high error size]