Millions of small files: best filesystem / best options

Bruce Evans brde at optusnet.com.au
Tue May 29 08:00:26 UTC 2012


On Tue, 29 May 2012, Bruce Evans wrote:

> ...
> - it is easy to fix ffs to support a minimum block size of 512 (by
>  reducing its gratuitous limit of MINBSIZE and fixing the few things
>  that break:

> On Mon, 28 May 2012, Doug Barton wrote:
>> The good news is that it's a big improvement (I've done similar
>> stuff in the past). You'll also want to tweak the -i (inode) value to
>> insure that you have sufficient inodes for the number of files you plan
>> to store. The default is not likely to be adequate for your needs.
>
> Big is relative.  4K-blocks with 200-byte files gives a wastage factor
> of 20.  Metadata alone will be 256 bytes for the inode alone with ffs2.
> Only 128 bytes with ffs1.  Only 32 bytes with msdosfs.

Oops, only a wastage factor of 2.5 with the 512-byte fragments that are
normally used with 4K-blocks by ffs.  512-byte blocks with ffs only
give a small reduction in metadata size and better block allocation.

Bruce


More information about the freebsd-fs mailing list