I know that doing a dd if=/dev/hda of=/dev/hdb
does a deep hard drive copy. I've heard that people have been able to speed up the process by increasing the number of bytes that are read and written at a time (default: 512
) with the bs
option.
My question is:
- What determines the ideal byte size for copying from a hard drive?
and
- Why does that determine the ideal byte size?
Best Answer
As Chris S wrote in this answer the optimum block size is hardware dependent. In my experience it is always greater than the default 512 bytes. If your working with raw devices then the overlying file system geometry will have no effect. I've used the script below to help 'optimize' the block size of dd.