Re: dd *very* slow (0.5KB/s) from IDE to SCSI - longish

2003-03-06 Thread Kirk Strauser
At 2003-03-07T03:03:51Z, "S W" <[EMAIL PROTECTED]> writes:

> I dropped that idea, but I'd read a post somewhere about dd, I tried...
>
> dd if=/dev/ad2 of=/dev/da0
>
> ...now the IDE activity LED has been on solid for about 4hours

dd's performance is highly depending on the size of its buffers, which are
abysmally small (512 bytes) by default:

[EMAIL PROTECTED]:~$ dd if=/dev/zero of=/tmp/foo count=1
1+0 records in
1+0 records out
512 bytes transferred in 0.74 secs (6916211 bytes/sec)

You can increase this by specifying your own buffer size:

[EMAIL PROTECTED]:~$ dd if=/dev/zero of=/tmp/foo count=1 bs=16384
1+0 records in
1+0 records out
16384 bytes transferred in 0.000173 secs (94654927 bytes/sec)

Before starting the full transfer, do something like:

dd if=/dev/ad2 of=/dev/da0 bs=512 count=16384

and keep doubling the size of the bs argument until the throughput values
stop increasing noticably, then use that value to duplicate your drive.  It
will still be somewhat slow, but I guarantee you can speed it up by at least
5 times.
-- 
Kirk Strauser
In Googlis non est, ergo non est.


pgp0.pgp
Description: PGP signature


dd *very* slow (0.5KB/s) from IDE to SCSI - longish

2003-03-06 Thread S W
SUMMARY:
I'm trying to transfer a working 4.7-RELEASE from an IDE disk to a SCSI disk 
using dd, but transfer of <3GB will take ~16 hours :o(

uname -a:
FreeBSD  4.7-RELEASE FreeBSD 4.7-RELEASE #0: Wed Oct  9 
15:08:34 GMT 2002 
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386
(PII 300MHz Digital 3500 workstation, 384MB RAM.)

Some device details:
IDE:
ad2 Western Digital 3GB (couldn't route cable to primary IDE) ata1-master 
UDMA33
acd0 Toshiba CD-ROM ata0-master PIO4

SCSI:
ahc0 Adaptec 2940 Host Adapter (ID7)
sa0 Sony SDT-5000 3.31 (DDS2 DAT drive) 5.000MB/s transfers (5.000MHz, 
offset 8) (ID6)
da0 Western Digital 4360 4GB hard disk 10.000MB/s transfers (10.000MHz, 
offset 15), Tagged Queueing Enabled (ID0)

The original install was done on ad2, then I came by the SCSI drive and 
wanted to do a Ghost-style replication and just use the SCSI disk.

After performing a full scan and low-level format of the SCSI disk from the 
adapter BIOS, I started a CD install (to quickly auto-setup the 
partitions/slices), and then aborted (system reset) once the partitions were 
defined and the disk was bootable (I think), and transfer of the OS from the 
CD had begun.

Now I'm booting to my IDE drive again (no probs).  I had hoped to mount the 
slices (partitions?) one by one on ad0 to /mnt, delete any contents the 
install had written before the abort, and copy the files over from ad2, but 
I couldn't mount them (errors either 'incorrect super block' or 'Operation 
not permitted').

I dropped that idea, but I'd read a post somewhere about dd, I tried...

dd if=/dev/ad2 of=/dev/da0

...now the IDE activity LED has been on solid for about 4hours

The dd command was run straight after boot, top says:
uptime 4hrs;
dd TIME 3m40s (and slowly rising);
dd STATE ~95% in PHYSST, 5% RUN;
dd CPU steady around 0.9% (only other running process is top)
iostat -w 1 da0 ad2 says:
0.50KB/transfer at 120 tps for da0 and ad2
(Steady, exact same figures for both so the data *is* moving).
Impractical, so ctrl-c dd:

1825499+0 records in
1825498+0 records out
934654976 bytes transferred in 15275 secs (61185 bytes/sec)
...about 900MB has transferred

Can you tell me...
1) Why the transfer is so slow?
2) What the process state 'physst' is (some kind of wait state)?
3) A better way to 'Ghost' the drive?  (Couldn't get g4u diskette to boot; 
and even if dd works I'll have 1GB unused on da0, I think?)

Any suggestions gratefully received.

TIA
Boinkster
PS First posting - my apologies if Hotmail formats in HTML.





_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message