From owner-freebsd-performance@FreeBSD.ORG Sun Oct 2 17:44:16 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 C9C0916A41F for ; Sun, 2 Oct 2005 17:44:16 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69D8043D45 for ; Sun, 2 Oct 2005 17:44:15 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [192.168.42.23] (andersonbox3.centtech.com [192.168.42.23]) by mh1.centtech.com (8.13.1/8.13.1) with ESMTP id j92HiED1004567; Sun, 2 Oct 2005 12:44:14 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <43401C62.2040606@centtech.com> Date: Sun, 02 Oct 2005 12:44:02 -0500 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.11) Gecko/20050914 X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-15?Q?=22Arne_=5C=22W=F6rner=5C=22=22?= References: <20051002170446.78674.qmail@web30303.mail.mud.yahoo.com> In-Reply-To: <20051002170446.78674.qmail@web30303.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: ClamAV 0.82/1107/Sun Oct 2 03:09:39 2005 on mh1.centtech.com X-Virus-Status: Clean Cc: freebsd-performance@freebsd.org, Patrick Proniewski 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 17:44:17 -0000 Arne W=F6rner wrote: > Hi! >=20 > --- Patrick Proniewski wrote: >=20 >>>Can u find out, if DMA transfers are enabled for those discs? >>>What does dmesg say? >> >>see end of mail for full dmesg output, >> >=20 > Looks good... :-)) But I never saw FBSD's kernel messages about > SATA drives... ;-) >=20 >=20 >>>Maybe atacontrol(8) says something useful about SATA discs, >>>too (e. g. atacontrol mode 0)? >> >># atacontrol mode 0 >>Master =3D BIOSPIO >>Slave =3D BIOSPIO >> >=20 > Hmm... 0 seems to be the wrong ata... Thats why the output does > not fit to SATA drives, I think... >=20 >=20 >># dd if=3D/dev/ad4 of=3D/dev/null bs=3D1m count=3D1000 >>1000+0 records in >>1000+0 records out >>1048576000 bytes transferred in 17.647464 secs (59417943 >>bytes/sec) >> >=20 > That seems to be 2 or about 2 times faster than disc->disc > transfer... But still slower, than I would have expected... > SATA150 sounds like the drive can do 150MB/sec... >=20 > As far as I know, SATA busses are independant from each other (no > master/slave; every drive gets its own cable)... Maybe "dd" cannot > issue a read request, while the write isn't completed? DMA > shouldn't be the problem, since the memory interface is quite fast > in your case... >=20 > So there remain the questions: > 1. Why does the read speed drop in ur setting (maybe writing to > ad6 takes more time than reading from ad4? u could try to run two > dd processes one with if=3Dad4 and the other with if=3Dad6)? > 2. Why can't we reach 150MB/sec? The reason why 35-40MB/s is good is because the drive itself cannot=20 stream any faster. SATA-150 interface is rated at 150MB/s, but the disk = cannot get close. Look at the specs for the drive, and you'll see that=20 the sustained rate is much lower than the burst speed. If you want fast = performance on a SATA disk, you'll need to buy a WD Raptor drive (74GB)=20 - that will get you more speed, but still not the 150MB/s. >>>(Maybe you could find a way to copy /dev/zero to /dev/ad6 >>>without destroying the previous work... :-)) >> >>well, not very easy both disk are the same size ;) >> >=20 > I thought of the first 1000 1MB blocks... :-) > The write speed might be interesting... Instead of dd, why not use gmirror? Also - reads can be faster since the drive can read-ahead a number of=20 blocks into the cache in an efficient manner, but writes have to be=20 streamed to disk as they come in (going through the cache, and=20 buffering, but you get the idea). Have you tried a smaller block size? What does 8k, 16k, or 512k do for=20 you? There really isn't much room for improvement here on a single devic= e. Eric --=20 ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------