Wednesday, May 5, 2010

Crank up the throttle on DD transfers

This is a quick one but I want to write it down just because I always seem to forget it if I don't use DD for a while.

DD's default block size (bs) is 512 bytes!

That's fine for some small work but you'll be waiting around for hours if your trying to shovel large disk images around.

Kick DD into high gear by raising the bs value to 32k and be done in minutes.

dd if=/dev/loop0 of=/dev/sdb bs=32k

In the example above, I've mounted a KVM disk image locally and an iSCSI lun as /dev/sdb. With the default 512b, DD was only able capitalize my 1g network at 5Mb/s. Switching to a 32k block size it utilized 40Mb/s.

No comments:

Post a Comment