From owner-freebsd-questions Sat Mar 8 16:49:39 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4259637B401 for ; Sat, 8 Mar 2003 16:49:37 -0800 (PST) Received: from hotmail.com (f141.law14.hotmail.com [64.4.21.141]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA1D143F75 for ; Sat, 8 Mar 2003 16:49:36 -0800 (PST) (envelope-from lordboink@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 8 Mar 2003 16:49:36 -0800 Received: from 62.220.129.65 by lw14fd.law14.hotmail.msn.com with HTTP; Sun, 09 Mar 2003 00:49:36 GMT X-Originating-IP: [62.220.129.65] From: "S W" To: freebsd-questions@freebsd.org Subject: Re: dd *very* slow. Now 75x faster thanks to Kirk's suggestion! Date: Sun, 09 Mar 2003 00:49:36 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 09 Mar 2003 00:49:36.0654 (UTC) FILETIME=[C211DAE0:01C2E5D5] Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ..snip.. > 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: kirk@kanga:~$ dd if=/dev/zero of=/tmp/foo count=1 1+0 records in 1+0 records out 512 bytes transferred in 0.000074 secs (6916211 bytes/sec) You can increase this by specifying your own buffer size: kirk@kanga:~$ 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. << attach3 >> Here's the results of doubling the buffer size as you suggested: BS bytes/sec 512 60808 (default) 1024 121614 2048 240212 4096 470312 8192 898897 16384 1652020 32768 2848452 65536 4490871* 131072 3811765 262144 3438026... iostat now reports a steady 4+MB/s (75x increase). Thanks alot, Kirk! Boink _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message