I'm zeroing a drive with

dd if=/dev/zero of=/dev/sdd

on a USB 3.0 port and it appears that the disk is writing half of the time and reading half of the time.

17564 be/4 root       10.59 M/s   10.59 M/s  0.00 % 96.60 % dd if=/dev/zero of=/dev/sdd

The performance is slower than what I expect, only being ~10M/s write and it looks like the rest of the bandwidth is being taken up by reads. The disk is not mounted nor being used by any other program.

Is this expected with dd?

  • I wonder if the /dev/zero input counts as a read. If you want to improve performance, using a buffer size would help, currently you are reading/writing a byte at a time: dd bs=1M if= of= – Paul Dec 5 '16 at 5:51
  • 5
    Related? – Kamil Maciorowski Dec 5 '16 at 6:02
  • It appears that using bs and a count does just writes. Maybe without a count dd reads the disk in between writes to see if it is at the end. Kamil, that is exactly it, thanks! – Ric Clark Dec 5 '16 at 6:28
  • 1
    I hope somebody provides a definitive answer to what is asked in the title, because I can't find actual documentation as to whether or not dd performs any verification of what it writes. – fixer1234 Dec 6 '16 at 1:06

You're not specifying the block size with the bs= parameter so dd writes in 512 bytes blocks.

Either your hard drive has 4096 bytes physical blocks (see https://superuser.com/questions/tagged/advanced-format), or the USB controller can't write in 512 bytes blocs but only bigger ones.

For every 512 bytes write that dd asks for the hard drive has to actually do a 4096 bytes read and a 4096 bytes write.

Not the answer you're looking for? Browse other questions tagged or ask your own question.