From owner-freebsd-fs@FreeBSD.ORG Tue Dec 18 00:12:35 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 EF62D906; Tue, 18 Dec 2012 00:12:35 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [IPv6:2001:5a8:4:7e72:4a5b:39ff:fe12:452]) by mx1.freebsd.org (Postfix) with ESMTP id BE8B88FC13; Tue, 18 Dec 2012 00:12:35 +0000 (UTC) Received: from chez.mckusick.com (localhost [127.0.0.1]) by chez.mckusick.com (8.14.3/8.14.3) with ESMTP id qBI0CW0c098207; Mon, 17 Dec 2012 16:12:32 -0800 (PST) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201212180012.qBI0CW0c098207@chez.mckusick.com> To: Sergey Kandaurov Subject: Re: FFS - Still using rotational delay with modern disks? In-reply-to: Date: Mon, 17 Dec 2012 16:12:32 -0800 From: Kirk McKusick X-Spam-Status: No, score=0.0 required=5.0 tests=MISSING_MID, UNPARSEABLE_RELAY autolearn=failed version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on chez.mckusick.com Cc: Greg 'groggy' Lehey , freebsd-fs@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:12:36 -0000 > Date: Tue, 18 Dec 2012 02:56:49 +0300 > Subject: Re: FFS - Still using rotational delay with modern disks? > From: Sergey Kandaurov > To: "Greg 'groggy' Lehey" > Cc: freebsd-fs@freebsd.org, freebsd-performance@freebsd.org, > Dieter BSD > > 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 Maxcontig is still in the filesystem. However, it is generally overridden (i.e., ignored) when clustering and dynamic block reallocation are in effect which they are by default and have been since some time early in the 1990's. Kirk McKusick