On Thu, Mar 31, 2011 at 02:50:36PM -0500, Amit Kulkarni wrote:

> >>
> >> If you really have a lot of used inodes, skipping the unused ones
> >> isn't going to help :-)
> >>
> >> You could always build your large-sized filesystems with a larger
> >> value of bytes-per-inode. newfs -i 32768 or 65536 is good for common
> >> filesystem use patterns with larger partitions (for specialist uses
> >> e.g. storing backups as huge single files it might be appropriate
> >> to go even higher).
> >
> 
> Stuart,
> 
> Thanks for the tip. But I can verify when I did lookup my 80G
> filesystem it is currently not specifying -i, so it is 8Kb per a
> single inode (it is 4 times frag size per your update to newfs man
> page). This is a no brainer optimization which can get huge wins in
> fsck immediately without too much change in the existing code.

I dont think we want to change thed default density. Larger
parttitions already gets larger blocks and fragment, and as a
consequence lower number of inodes.

> Otto,
> In my tests on AMD64, if FFS partition size increases beyond 30GB,
> fsck starts taking exponential time even if you have zero used inodes.
> This is a for i () for j() loop and if you reduce the for j() inner
> loop it is a win.

Yes, it becomes very slow, but I don't think it is exponential.

> 
> dumpfs -m /downloads
> # newfs command for /dev/wd0o
> newfs -O 1 -b 16384 -e 4096 -f 2048 -g 16384 -h 64 -m 5 -o time -s
> 172714816 /dev/wd0o
> 
> So, if I read it correctly, setting just the block size higher to say
> 64Kb does auto tune frag size to 1/8 which is 8Kb (newfs complains
> appropriately) but the auto tune inode length to 4 times frag which is
> 32Kb is not implemented now? Is this the proposed formula?

There's no such thing as inode length. 

> 
> If a user tunes -i inodes, or -f frags or -b block size, it should all
> auto-adjust to the same outcome based on above formula in the future?

I don't see any formula.

If you feel you have too many inodes, you can use a larger -i, -b and or -f
For newly created partitions, newfs will pickup larger -b and -f from
the disklabel entry. If you still want less inodes, increase -f, -b or
-i further.

> 
> dumpfs doesn't show the total inodes or the inode length in a easily
> readable format (-m option). Just trying to understand what the
> acronyms mean.

You want toal inodes = ng * ipg (number of cylinder groups * inode per
group) in the dumpfs header. I have no idea what you mean by inode length.

        -Otto

Reply via email to