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?

asked Jan 7, 2015 by Eric Z Ma (44,280 points)

1 Answer

 
Best answer

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 Jan 8, 2015 by MV (460 points)
selected Jan 8, 2015 by Eric Z Ma

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

commented Jan 8, 2015 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...