From owner-freebsd-fs@FreeBSD.ORG Tue Dec 18 00:03:33 2012 Return-Path: Delivered-To: freebsd-fs@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-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems 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