Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Dec 2011 11:14:57 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Dieter BSD <dieterbsd@engineer.com>
Cc:        freebsd-fs@freebsd.org, freebsd-performance@freebsd.org
Subject:   Re: Maximum blocksize for FFS?
Message-ID:  <20111213091457.GU50300@deviant.kiev.zoral.com.ua>
In-Reply-To: <20111212235034.218250@gmx.com>
References:  <20111212235034.218250@gmx.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Mon, Dec 12, 2011 at 06:50:33PM -0500, Dieter BSD wrote:
> Many recent disks have a 4KiB sector size, so newfs's default
> 2KiB frag size seems suboptimal for these drives. Newfs's man
> page states: "The optimal block:fragment ratio is 8:1. Other
> ratios are possible, but are not recommended, and may produce
> poor results." š(It is not clear to me what the 8:1 ratio optimizes,
> or exactly what poor results one should expect with a different ratio?)
> Thus one would logically think of using 32 KiB blocksize 4KiB fragsize
> at a minimum with these drives.
> 
> But, from a discussion in 2009:
> 
> Bruce Evans wrote:
> > Any block size above the default (16K) tends to thrash and fragment buffer
> > cache virtual memory. šThis is obviously a good pessimization with lots of
> > small files, and apparently, as you have found, it is a good pessimization
> > with a few large files too. šI think severe fragmentation can easily take
> > several seconds to recover from. šThe worst case for causing fragmentaion
> > is probably a mixture of small and large files.
> 
> This caused a *severe* performance problem and I was forced to reduce to
> reduce my blocksize to 16KiB. š:-(
> 
> For data filesystems with large files (multi GB), there are many advantages
> to using large blocksizes such as less space wasted on bookkeeping,
> and faster fsck times.
> 
> So I'm wondering if this buffer cache virtual memory thrashing/fragmenting
> problem has been fixed? šIs it safe to use 64KiB/8KiB yet? šIIRC I've
> read concerns about thrashing/fragmenting due to different filesystems
> having different sizes, say one filesystem being 16K/2K and another being
> 64k/8K?
> 
> Also, has the "bug in vfs_bio.c" been fixed? (64KiB blocksize can
> hang the system)
> 
> Any other gottchas?
I think the default KVA allocated for the buffer cache might be too small
for the 64KB blocks. The only known issue that prevented defragmentation
from working was fixed in r189878.

I did not see further reports of the hangs caused by fragmented buffer KVA.

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk7nF5EACgkQC3+MBN1Mb4gXLQCfc5Avzx04azOdEpi+0xfQ+Ufz
EWMAoJhCmRlybh4j1kgdqK88tX+aWEAN
=lIRB
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111213091457.GU50300>