From owner-freebsd-performance@FreeBSD.ORG Mon Dec 17 21:44:21 2012 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D82DEE24 for ; Mon, 17 Dec 2012 21:44:21 +0000 (UTC) (envelope-from dieterbsd@engineer.com) Received: from mailout-us.gmx.com (mailout-us.gmx.com [74.208.5.67]) by mx1.freebsd.org (Postfix) with SMTP id 744818FC14 for ; Mon, 17 Dec 2012 21:44:21 +0000 (UTC) Received: (qmail 5046 invoked by uid 0); 17 Dec 2012 21:44:14 -0000 Received: from 67.206.184.86 by rms-us005 with HTTP Content-Type: text/plain; charset="utf-8" Date: Mon, 17 Dec 2012 16:44:11 -0500 From: "Dieter BSD" Message-ID: <20121217214413.263570@gmx.com> MIME-Version: 1.0 Subject: FFS - Still using rotational delay with modern disks? To: freebsd-fs@freebsd.org,freebsd-performance@freebsd.org X-Authenticated: #74169980 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 Content-Transfer-Encoding: 8bit X-GMX-UID: eve9cJEH3zOlNR3dAHAh+cZ+IGRvb0Ci X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 21:44:21 -0000 The newfs man page says: -a maxcontig Specify the maximum number of contiguous blocks that will be laid out before forcing a rotational delay.  The default value is 16. See tunefs(8) for more details on how to set this option. Is this still a good idea with modern drives where the number of sectors per track varies, and no one but the manufacturer knows how many sectors a particular track has? [1] Skipping sectors could unnecessarily force a seek to the next track, thus hurting rather than helping performance. I have to wonder if FreeBSD even supports any hard drives that don't use zone bit recording? The tunefs man page does not mention this parameter. [1] http://en.wikipedia.org/wiki/Zone_bit_recording From owner-freebsd-performance@FreeBSD.ORG Mon Dec 17 23:24:02 2012 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D4491B8C; Mon, 17 Dec 2012 23:24:02 +0000 (UTC) (envelope-from grog@lemis.com) Received: from w3.lemis.com (w3.lemis.com [208.86.224.149]) by mx1.freebsd.org (Postfix) with ESMTP id 9CC588FC0C; Mon, 17 Dec 2012 23:24:02 +0000 (UTC) Received: from eureka.lemis.com (1032.x.rootbsd.net [208.86.224.149]) by w3.lemis.com (Postfix) with ESMTP id 5B8643B86E; Mon, 17 Dec 2012 23:23:55 +0000 (UTC) Received: by eureka.lemis.com (Postfix, from userid 1004) id 46911F7952; Tue, 18 Dec 2012 10:23:51 +1100 (EST) Date: Tue, 18 Dec 2012 10:23:51 +1100 From: Greg 'groggy' Lehey To: Dieter BSD Subject: Re: FFS - Still using rotational delay with modern disks? Message-ID: <20121217232351.GB26067@eureka.lemis.com> References: <20121217214413.263570@gmx.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tjCHc7DPkfUGtrlw" Content-Disposition: inline In-Reply-To: <20121217214413.263570@gmx.com> User-Agent: Mutt/1.4.2.3i Organization: The FreeBSD Project Phone: +61-3-5346-1370 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Cc: freebsd-fs@freebsd.org, freebsd-performance@freebsd.org X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 23:24:02 -0000 --tjCHc7DPkfUGtrlw Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Monday, 17 December 2012 at 16:44:11 -0500, Dieter BSD wrote: > The newfs man page says: > > -a maxcontig > Specify the maximum number of contiguous blocks that will be laid > out before forcing a rotational delay. =A0The default value is 16. > See tunefs(8) for more details on how to set this option. > > Is this still a good idea with modern drives where the number of > sectors per track varies, and no one but the manufacturer knows how > many sectors a particular track has? No. It looks as if this, and also a number of comments in sys/ufs/ffs/fs.h and sys/ufs/ffs/ffs_alloc.c, are leftovers from the Olden Days. The value isn't used anywhere that I can see. Unless somebody can show that I'm wrong, I'd suggest that this is a documentation issue that I can take a look at. Greg -- Sent from my desktop computer. Finger grog@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. This message is digitally signed. If your Microsoft MUA reports problems, please read http://tinyurl.com/broken-mua --tjCHc7DPkfUGtrlw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlDPqYYACgkQIubykFB6QiMTdgCgnSbwTAVdmMhQmevW58pQkzfa 6YEAmwSLbiObOc/9ezYwrh6RS+yE9Hsh =f3VJ -----END PGP SIGNATURE----- --tjCHc7DPkfUGtrlw-- From owner-freebsd-performance@FreeBSD.ORG Tue Dec 18 00:03:33 2012 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1AD7D4BF; Tue, 18 Dec 2012 00:03:33 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qa0-f41.google.com (mail-qa0-f41.google.com [209.85.216.41]) by mx1.freebsd.org (Postfix) with ESMTP id 8A7D08FC0A; Tue, 18 Dec 2012 00:03:32 +0000 (UTC) Received: by mail-qa0-f41.google.com with SMTP id o19so3035553qap.14 for ; Mon, 17 Dec 2012 16:03:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=qz71msNQFazbcqcGtH2NkC2rVE1x7F8bbEGAE7bcvdQ=; b=wxiGDQfAYXhfnPAPChoB1Xpt2q/ndixfKnMC8ae1f2o/HX7YP5hBMbaQZhVAX5Q2YT 3+hGapdbaXPio1DlOJNF/9Hs15sKegYHrnDlVafPO+Fkx5Wa3I9kwYsr637oxZPCW2uZ 4Ly2aqqj0lpQgcSPi4pe6VWQPt4f7o93CbYyvfUCciG7pFVrhZCKx9eNcP/oMINEKITH yQPzqW/qvL+rAyhXRY5ZqHfCMGhqJ5ugWzjFP4XQpsBvELUAa2eZv9rkaQgtlknRAJhT lEFvhc4pA5o43RPSk8VEQjzsXkaboEuGalTNGYUMcQgqMWxOUJOaizCa+r3ThBFXa4u+ kpvA== MIME-Version: 1.0 Received: by 10.49.74.10 with SMTP id p10mr37391qev.35.1355788609895; Mon, 17 Dec 2012 15:56:49 -0800 (PST) Received: by 10.229.78.96 with HTTP; Mon, 17 Dec 2012 15:56:49 -0800 (PST) In-Reply-To: <20121217232351.GB26067@eureka.lemis.com> References: <20121217214413.263570@gmx.com> <20121217232351.GB26067@eureka.lemis.com> Date: Tue, 18 Dec 2012 02:56:49 +0300 Message-ID: Subject: Re: FFS - Still using rotational delay with modern disks? From: Sergey Kandaurov To: "Greg 'groggy' Lehey" Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-fs@freebsd.org, freebsd-performance@freebsd.org, Dieter BSD X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 00:03:33 -0000 On 18 December 2012 03:23, Greg 'groggy' Lehey wrote: > On Monday, 17 December 2012 at 16:44:11 -0500, Dieter BSD wrote: >> The newfs man page says: >> >> -a maxcontig >> Specify the maximum number of contiguous blocks that will be laid >> out before forcing a rotational delay. The default value is 16. >> See tunefs(8) for more details on how to set this option. >> >> Is this still a good idea with modern drives where the number of >> sectors per track varies, and no one but the manufacturer knows how >> many sectors a particular track has? > > No. > > It looks as if this, and also a number of comments in sys/ufs/ffs/fs.h > and sys/ufs/ffs/ffs_alloc.c, are leftovers from the Olden Days. The > value isn't used anywhere that I can see. Unless somebody can show > that I'm wrong, I'd suggest that this is a documentation issue that I > can take a look at. [performance@ list trimmed] I'm not sure about this. In UFS fs_maxcontig controls fs_contigsumsize during newfs, both saved in superblock, and fs_contigsumsize is widely used throughout FFS. sblock.fs_maxcontig = maxcontig; if (sblock.fs_maxcontig < sblock.fs_maxbsize / sblock.fs_bsize) { sblock.fs_maxcontig = sblock.fs_maxbsize / sblock.fs_bsize; printf("Maxcontig raised to %d\n", sblock.fs_maxbsize); } if (sblock.fs_maxcontig > 1) sblock.fs_contigsumsize = MIN(sblock.fs_maxcontig,FS_MAXCONTIG); For ext2 this is instead "reconstructed" in the in-memory sblock copy in mountfs(). /* * Calculate the maximum contiguous blocks and size of cluster summary * array. In FFS this is done by newfs; however, the superblock * in ext2fs doesn't have these variables, so we can calculate * them here. */ ump->um_e2fs->e2fs_maxcontig = MAX(1, MAXPHYS / ump->um_e2fs->e2fs_bsize); if (ump->um_e2fs->e2fs_maxcontig > 0) ump->um_e2fs->e2fs_contigsumsize = MIN(ump->um_e2fs->e2fs_maxcontig, EXT2_MAXCONTIG); else ump->um_e2fs->e2fs_contigsumsize = 0; -- wbr, pluknet