How to make dd faster on Linux?

dd seems slow when I use command like

# dd if=/dev/sda2 of=./sda2.bak

How to make it faster?

You can make dd faster by specifying a good bs like

# dd if=/dev/sda2 of=./sda2.bak bs=8192

8192 is a magic number. There are may be other good sizes for bs for different systems. But 8192 works pretty well for me.

It may be a little bit old and off topic, but 8192 is tested a good number in OCaml systems programming (see “2.10 The cost of system calls and buffers”) that is the not too large and is large enough to achieve good I/O throughput.

I/O buffer vs I/O throughput

Answered by MV.

Checked the man page on my system, the default value of bs (ibs and obs) is set to 512…

Leave a Reply

Your email address will not be published. Required fields are marked *