[svlug] 2 part Linux question

Tim Flagg timf at linuxmigration.com
Thu Jul 10 09:58:13 PDT 2003

> I have used dd before and it was painfully slow.  Does anyone have any tips for
> making it faster?

Choosing the right buffer size for dd to use when doing the reads and
writes will dramatically improve performance.  The default for dd is
usually 512 bytes per read and write, which would result in very slow

Try something like the following, which would transfer 1 megabyte
at a time:
    dd if=<input device> of=<output-device> bs=1024k

The optimal performance would probably be to transfer a whole disk
cylinder at a time (see "fdisk -l" to find out the number of bytes
per cylinder).

To see how a small buffer size can impact performance, time dd first with
a buffer size of 1 byte and then a buffer size of 1 megabyte: For example:

    time dd if=/boot/vmlinuz of=/dev/null bs=1
    time dd if=/boot/vmlinuz of=/dev/null bs=1m


More information about the svlug mailing list