On Wed, Jun 11, 2014 at 17:45, Peter Fraser wrote:
> To duplicate a disk I used the following:
> 
> dd if=/dev/rsd2c of=/dev/rsd3c bs=32M seek=1 skip=1 conv=noerror
> 
> the bs=32M was picked because it was a large size, and the machine has
> lots of
> free memory.
> 
> Watching the machine I could see the disk activity lights blinking
> alternately
> about once a second
> and looks like, what I would expect, that dd does blocking I/O.
> 
> Is there any method of coping a disk or partition, or even a file that uses
> non-blocking I/O?

There was a change made a few years ago to limit the number of pending
writes, which improves interactive response. It's not supposed to
seriously impair write performance, but I've had a few worries that
maybe it does.

A workaround may be to use two dd processes; something like:

dd if=/dev/rsd0c bs=64k | dd of=/dev/rsd1c bs=64

(The change was originally made due to a very similar situation as
you're doing, but with slower disks. If you copy a huge file to a slow
USB flash drive, the kernel would buffer the entire file for writing
and eventually you'd be unable to do anything else until the file was
written out. After the change, writes are effectively restricted to
disk speed, but this may be causing dd to stall when it could be
reading.)

Reply via email to