From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 28 16:30:06 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCA7A106566C for ; Sat, 28 Aug 2010 16:30:06 +0000 (UTC) (envelope-from tdamas@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 670EA8FC1F for ; Sat, 28 Aug 2010 16:30:06 +0000 (UTC) Received: by vws7 with SMTP id 7so4462298vws.13 for ; Sat, 28 Aug 2010 09:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=GYCo8qXXFu4t7aUqLFylm06zHmImhwWufx8qxvZKjjI=; b=Ei7lD+J37dWW+R6vaTaxKoYquTmu0HMO+Z/0FXCROM78QNMD3UDJr10gGsBfb+/4zF VYi91ocHqPDdCtsgx5CIDC0zscpX+DTVnpSFB12nMtKkcK+0OaNJTV3bWpaTBycRG7wg sm/WbfT480VEp6RfjjUoAGD4+Q0dq2/BZS+DY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=bdyYrQ3lNr8bCiWhHKEvns/pVrEByC1McakZGIL/Q+I0WkVFNCtbmJJbmrDEWMFeoM 4sO+WBFU5NLRG1LVKIQgoo0HaMO0RYlXTxn8v7id+q6olarlfvFwX1/SQdO8l+ddmo6m YaopHNmFTxhGVOBzgrhoWRnQmcicmAs3xsgyM= Received: by 10.220.158.9 with SMTP id d9mr1367782vcx.109.1283011569166; Sat, 28 Aug 2010 09:06:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.58.195 with HTTP; Sat, 28 Aug 2010 09:05:49 -0700 (PDT) In-Reply-To: <20100828195024.3d671a76@kibab.com> References: <86wrry1hwv.fsf@ds4.des.no> <20100828130912.48205a47@kibab.com> <20100828195024.3d671a76@kibab.com> From: Thiago Damas Date: Sat, 28 Aug 2010 13:05:49 -0300 Message-ID: To: Ilya Bakulin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= , hackers@freebsd.org, geom@freebsd.org Subject: Re: Support for WD Advanced Format disks X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2010 16:30:06 -0000 You read: "ATA 4K sector issues" http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html 2010/8/28 Ilya Bakulin : > On Sat, 28 Aug 2010 13:09:12 +0400 > Ilya Bakulin wrote: > >> Right now I'm running phybs -w /dev/ad7p1 > > Well, phybs finished. > Results: > kibab-desktop# ./phybs -w /dev/ad7p1 > =A0 count =A0 =A0size =A0offset =A0 =A0step =A0 =A0 =A0 =A0msec =A0 =A0 t= ps =A0 =A0kBps > > =A0131072 =A0 =A01024 =A0 =A0 =A0 0 =A0 =A04096 =A0 =A0 3098125 =A0 =A0 = =A0 0 =A0 =A0 =A042 > =A0131072 =A0 =A01024 =A0 =A0 512 =A0 =A04096 =A0 =A0 3100047 =A0 =A0 =A0= 0 =A0 =A0 =A042 > > =A0 65536 =A0 =A02048 =A0 =A0 =A0 0 =A0 =A08192 =A0 =A0 1505809 =A0 =A0 = =A0 0 =A0 =A0 =A087 > =A0 65536 =A0 =A02048 =A0 =A0 512 =A0 =A08192 =A0 =A0 1505179 =A0 =A0 =A0= 0 =A0 =A0 =A087 > =A0 65536 =A0 =A02048 =A0 =A01024 =A0 =A08192 =A0 =A0 1506127 =A0 =A0 =A0= 0 =A0 =A0 =A087 > > =A0 32768 =A0 =A04096 =A0 =A0 =A0 0 =A0 16384 =A0 =A0 1522343 =A0 =A0 =A0= 1 =A0 =A0 =A086 > =A0 32768 =A0 =A04096 =A0 =A0 512 =A0 16384 =A0 =A0 1521017 =A0 =A0 =A0 1= =A0 =A0 =A086 > =A0 32768 =A0 =A04096 =A0 =A01024 =A0 16384 =A0 =A0 1523748 =A0 =A0 =A0 1= =A0 =A0 =A086 > =A0 32768 =A0 =A04096 =A0 =A02048 =A0 16384 =A0 =A0 1522853 =A0 =A0 =A0 1= =A0 =A0 =A086 > > =A0 16384 =A0 =A08192 =A0 =A0 =A0 0 =A0 32768 =A0 =A0 =A0890911 =A0 =A0 = =A0 3 =A0 =A0 147 > =A0 16384 =A0 =A08192 =A0 =A0 512 =A0 32768 =A0 =A0 =A0892026 =A0 =A0 =A0= 3 =A0 =A0 146 > =A0 16384 =A0 =A08192 =A0 =A01024 =A0 32768 =A0 =A0 =A0890699 =A0 =A0 =A0= 3 =A0 =A0 147 > =A0 16384 =A0 =A08192 =A0 =A02048 =A0 32768 =A0 =A0 =A0891862 =A0 =A0 =A0= 3 =A0 =A0 146 > =A0 16384 =A0 =A08192 =A0 =A04096 =A0 32768 =A0 =A0 =A0889903 =A0 =A0 =A0= 3 =A0 =A0 147 > > Obviously 34-sectors offset is bad for phybs. Write requests are NEVER ge= t aligned. > I have recreated partition as follows: > > kibab-desktop# gpart delete -i 1 ad7 > ad7p1 deleted > kibab-desktop# gpart add -t freebsd-ufs -s 10G -b 63 ad7 > ad7p1 added > kibab-desktop# gpart show ad7 > =3D> =A0 =A0 =A0 =A034 =A02930277101 =A0ad7 =A0GPT =A0(1.4T) > =A0 =A0 =A0 =A0 =A034 =A0 =A0 =A0 =A0 =A029 =A0 =A0 =A0 - free - =A0(15K) > =A0 =A0 =A0 =A0 =A063 =A0 =A020971520 =A0 =A01 =A0freebsd-ufs =A0(10G) > =A0 =A020971583 =A02909305552 =A0 =A0 =A0 - free - =A0(1.4T) > > So, we have ad7p1 which is still misaligned, but if write request will st= art at offset=3D512, it will be aligned properly. > Let's test as follows: > > kibab-desktop# ./phybs -l 4096 -w /dev/ad7p1 > =A0 count =A0 =A0size =A0offset =A0 =A0step =A0 =A0 =A0 =A0msec =A0 =A0 t= ps =A0 =A0kBps > > =A0 32768 =A0 =A04096 =A0 =A0 =A0 0 =A0 16384 =A0 =A0 1520609 =A0 =A0 =A0= 1 =A0 =A0 =A086 > =A0 32768 =A0 =A04096 =A0 =A0 512 =A0 16384 =A0 =A0 =A0 17898 =A0 =A0 151= =A0 =A07323 > =A0 32768 =A0 =A04096 =A0 =A01024 =A0 16384 =A0 =A0 1524899 =A0 =A0 =A0 1= =A0 =A0 =A085 > > :-) Aligned writes are 86 times faster than misaligned!!! > -- > Regards, > Ilya Bakulin > http://kibab.com > xmpp://kibab612@jabber.ru >