From owner-freebsd-performance@FreeBSD.ORG Sun Oct 2 15:59:32 2005 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36EB516A41F for ; Sun, 2 Oct 2005 15:59:32 +0000 (GMT) (envelope-from arne_woerner@yahoo.com) Received: from web30313.mail.mud.yahoo.com (web30313.mail.mud.yahoo.com [68.142.201.231]) by mx1.FreeBSD.org (Postfix) with SMTP id 7339243D6E for ; Sun, 2 Oct 2005 15:59:27 +0000 (GMT) (envelope-from arne_woerner@yahoo.com) Received: (qmail 19633 invoked by uid 60001); 2 Oct 2005 15:59:26 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=qtqj3U4Srz+NFHnSe6rDXja82fi6yXlnMs2XU3S6LvAIXwK0eIW7s2U9waKc8XlAX7KHsm5lEcr4MSfd5Eo53E4ygSOkbFv7ZICNSw64lpvaiGHkAuJeoDucc7vJU9VhbIE0KMuAk4OL9lNF2s4fBXLt18SOtDgPgtK3nlapmvY= ; Message-ID: <20051002155926.19631.qmail@web30313.mail.mud.yahoo.com> Received: from [213.54.70.142] by web30313.mail.mud.yahoo.com via HTTP; Sun, 02 Oct 2005 08:59:26 PDT Date: Sun, 2 Oct 2005 08:59:26 -0700 (PDT) From: Arne "Wörner" To: Steven Hartland , freebsd-performance@freebsd.org, Patrick Proniewski In-Reply-To: <003e01c5c764$3391d720$b3db87d4@multiplay.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: dd(1) performance when copiing a disk to another X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2005 15:59:32 -0000 --- Steven Hartland wrote: > From: "Patrick Proniewski" >> # 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 the bottleneck? 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 ? >> Hmm... 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... :-)) E. g.: # 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 ;-)) )... -Arne __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com