dd(1) performance when copiing a disk to another
arne_woerner at yahoo.com
Sun Oct 2 08:59:32 PDT 2005
--- Steven Hartland <killing at multiplay.co.uk> wrote:
> From: "Patrick Proniewski" <patpro at patpro.net>
>> # dd if=/dev/ad4 of=/dev/ad6 bs=1m
>> It yields to poor performances:
> That's actually pretty good for a sustained read / write on a
> single disk.
Does somebody know, why this is "pretty good"? I mean: Where is
As far as I know, SATA is quite fast... And memory to memory
copies are quite fast... disc<->memory should be quite fast, too.
>> Is it normal that data rate won't go upper than 35/38 MB/s ?
Can u find out, if DMA transfers are enabled for those discs?
What does dmesg say?
What does "sysctl hw.ata.ata_dma" say?
Maybe atacontrol(8) says something useful about SATA discs, too
(e. g. atacontrol mode 0)?
Can u try the following commands, when the system (especially the
discs) is idle?
#dd if=/dev/ad4 of=/dev/null bs=1m count=1000
#dd if=/dev/zero of=/dev/null bs=1m count=1000
(Maybe you could find a way to copy /dev/zero to /dev/ad6 without
destroying the previous work... :-))
# dd if=/dev/ad6 of=/tmp/arne bs=1m count=1000
# dd if=/dev/zero of=/dev/ad6 bs=1m count=1000
# dd if=/tmp/arne of=/dev/ad6 bs=1m count=1000
> one more question: is dd(1) a good way to duplicate a boot
> drive to make a bootable spare disk ?
I say, is the file system on /dev/ad4 read only during the "dd"?
If /dev/ad4 changes before "dd" completes, ad6 might need a fsck
or ad6 might be useless...
Btw.: I use gmirror(8)... But then an unintentional, fatal change
von ad4 would be fatal for ad6, too... :-)) So I have to hope,
that I do not type things, I shall not type (luckily I have some
boot CDs for that unlikely case ;-)) )...
Yahoo! Mail - PC Magazine Editors' Choice 2005
More information about the freebsd-performance