Linux: Slow dd because of default blocksize

linux-logoToday is backed up my SSD so i can install Ubuntu 11.04 fearlessly.
Problem was that dd was very slow, but i found a solution.

By default dd seems to use 512 Byte as default blocksize. This means copying 10 GB lets dd move 20 million blocks. This is very stressful for the computer.
You can speed the whole thin up by giving a bigger blocksize via parameter.


# dd if=/dev/sda2 of=/media/BACKUPHDD/Backup/SSD/system.img bs=4M

The optimal blocksize might depend from your hardware. If time is important, you might do some short tests with different blocksizes.

No related posts.


2 Kommentare zu “Linux: Slow dd because of default blocksize”

  1. Resuna 16. Juni 2011 um 15:00

    You can also get some buffering in there with "dd if=/dev/sda2 bs=4m | dd of=whatever bs=4m". Don't know if it would help with disk, but it used to be killer for tape.

  2. Julius 17. Juni 2011 um 08:27

    Using a pipe might be a good idea, because pipes can be queue-cached by operating system.