dd copy very slow

Post Reply
derek
Posts: 96
Joined: Fri Oct 22, 2010 12:26 am

dd copy very slow

Post by derek »

I am using dd to copy one device to another. It is very slow e.g. a little over 5 MB/sec. Is this expected?

The source device is an internal SATA II SSD. hdparm says that it is able to achieve an uncached read speed of about 80 MB/sec, which is close to the limit of the SATA II bridge, I would imagine. That speed is fine.

The destination device is a USB-attached HDD (SATA II in USB 2.0 enclosure). When the destination disk is installed internally (temporarily for testing purposes!) hdparm says that it is able to achieve an uncached read speed of about 80 MB/sec. When the disk is attached via USB hdparm says that it is able to achieve an uncached read speed of about 26 MB/sec.

The dd command is

Code: Select all

dd if=sdx of=sdy
where x and y are the letters of the drives. NB: This is copying the whole disk (MBR, all partitions, all free space i.e. regardless of partitions and regardless of file system).

Is this some artifact of the dd command?

In case anyone is interested, the resulting disk is bootable and mountable - but not on the original fitPC. I think that might have something to do with conflicting UUIDs. Yeah, I know I could use tune2fs to change the UUID after the copy. I haven't tried that though.

Denis
Posts: 301
Joined: Sun Apr 26, 2009 3:24 pm

Re: dd copy very slow

Post by Denis »

Use 1M blocksize instead of default 512b to optimize dd:

Code: Select all

dd if=sdx of=sdy bs=1M
Compulab's Linux support

derek
Posts: 96
Joined: Fri Oct 22, 2010 12:26 am

Re: dd copy very slow

Post by derek »

Yes, that is much better. Thanks. A little over 18 MB/sec.

(In case you are wondering, I am grappling with backup. If information is stored on the fitPC then it is worth backing up but the fitPC2 specification doesn't make this easy i.e. finding the right compromise between capacity of internal disk and time to copy it to another disk.)

Post Reply

Return to “Linux Mint”