SUMARY: dd

From: Steven Aizic (saizic@rogers.com)
Date: Mon May 27 2002 - 20:44:38 EDT


Question:
=======
Hi All,

Yesterday I tried to do a:

dd if=/dev/rdsk/c0t1d0s2 of=/dev/rdsk/c0t0d0s2 bs=4096

as suggested on www.sun.com

After about 2 hours, the copy was still not complete, and due to downtime
running out, I had to abort. The disk was a 9 GB disk.

Any idea what went wrong? I booted off CD as well to do the "dd" command.

Thanks.

Answers:
=======
Thanks to all the answers I got. Most of the answers I got were related to
the block size that I chose
or the fact that I was using a single controller (I could not avoid the single
controller unfortunately).
It was also suggested to pipe a "dd" process to another "dd" process, as to
take advantage of multiple
CPU servers. Here are the details below:
-----------------------------------------------------------------------------
---------------------------------------------
Mark Hargrave <hargrme@wisdom.maf.nasa.gov>

I use "bs=1008b" which works fine.

Thanks,

Mark
-----------------------------------------------------------------------------
---------------------------------------------
Steve Hunt <steve@gordian.co.uk>

this isn't going to be specific enough, but to get the maximum
speed out of the system you need to know the geometry of the
disks (so as to minimise searchs across the disk by reading of
chunks the same size as the cylinders? on the disk) - it was
explained to me a long time ago and i'd have to go back to my
copy of the red book to work it out, but getting that wrong
can double the time taken to copy...
anyway, sorry if that's not enough detail, but hopefully you'll
get a more precise answer through too,
Steve
-----------------------------------------------------------------------------
---------------------------------------------
Walter Hedrick <WHedrick@amccorp.com>

I've seen this before. You're competing for the same SCSI bus. See if you
can do the copy across two different controllers.
-----------------------------------------------------------------------------
---------------------------------------------
Brett Lymn <blymn@baesystems.com.au>

Try increasing the block size by at least a factor of 100 (409600) or
more, if you have the memory, I suspect reading lots of little blocks
is your bottleneck here.
-----------------------------------------------------------------------------
---------------------------------------------
Michael Sullivan <mps@blackbird.discomsys.com>

You might have tried a larger block size. Perhaps 4096k or even larger.

Also, disks on different SCSI busses/controllers would also help speed
things up.

Another thing which might help would be pipe one dd into another:

dd if=/dev/rdsk/c0t1d0s2 bs=8192k | dd of=/dev/rdsk/c0t0d0s2 bs=8192k

If you have more than one processor this may help having a "reader" and
a "writer" using IPC. It may even help on a single processor.

Mike
-----------------------------------------------------------------------------
---------------------------------------------
Gaziz Nugmanov <sunman@lists.gaziz.ca>

Hello Steven,

4k buffer is too low. It was ok for old small disks of 100mb.

For 9 -36 GB disks use bs=2048k.

Gaziz
-----------------------------------------------------------------------------
---------------------------------------------
David Markowitz <David.Markowitz@sspsolutions.com>

Try a *much* larger block size:

 dd if=/dev/rdsk/c0t1d0s2 of=/dev/rdsk/c0t0d0s2 bs=64k
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:23 EDT