Skip to content
Advertisement

transfer rate of dd to a disk is much less than copy file

The case is that I use dd command to build a bootable usb for xxOS. /dev/disk2 is usb device. command is

dd if=xxOS.iso of=/dev/disk2 bs=8m

It spends a lot of time, the transfer rate is about 2MB/s~4MB/s. It makes me puzzle, why it’s more slowly than copying files to an USB about 10MB/s or more up. May I use the right parameter?

Advertisement

Answer

Don’t assume that that the time taken for dd to return to the prompt is an accurate measure of the time taken to write the data to storage — regardless of the device. Modern operating systems cache disk data in many different places. Running dd with the oflags=sync option will give a better idea of the real time, as might simply running sync at the prompt after the dd operation.

In general, though, storage I/O is pretty hard to time accurately on modern Linux systems.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement