Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Dec 2012 02:56:49 +0300
From:      Sergey Kandaurov <pluknet@gmail.com>
To:        "Greg 'groggy' Lehey" <grog@freebsd.org>
Cc:        freebsd-fs@freebsd.org, freebsd-performance@freebsd.org, Dieter BSD <dieterbsd@engineer.com>
Subject:   Re: FFS - Still using rotational delay with modern disks?
Message-ID:  <CAE-mSOJGXWGp%2B=GPLyA3NjLGnqXNj9eiQ1_%2B2X7oNkGSnrHpuw@mail.gmail.com>
In-Reply-To: <20121217232351.GB26067@eureka.lemis.com>
References:  <20121217214413.263570@gmx.com> <20121217232351.GB26067@eureka.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 18 December 2012 03:23, Greg 'groggy' Lehey <grog@freebsd.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAE-mSOJGXWGp%2B=GPLyA3NjLGnqXNj9eiQ1_%2B2X7oNkGSnrHpuw>