tunefs

Larry McVoy lm at snafu.Sun.COM
Sat Sep 1 13:07:14 AEST 1990


In article <EMV.90Aug31155848 at stag.math.lsa.umich.edu> emv at math.lsa.umich.edu (Edward Vielmetti) writes:
>   This changes the minimum amount of free space from the default (10
>   percent) to a more adequate [in a disk-space-starved environment, like
>   ours :-(] 2% (that's the number 2 in the /tunefs commands).

The fast file system (you have it if you have tunefs) has a multi alg
allocator.  The file system trys to allocate things nicely.  For
example, if you are running with a rot delay of 4ms (most people are)
then the allocator will try to allocate the next block on the same track,
4ms done the line.  Failing that, it will try anywhere on the same
track, then anywhere in the same cylinder group, and finally a some
sort of brute force search (I may have this a bit wrong; go read the
paper to see what really happens).

Anyway, the scoop is that as the file system fills up it gets less and
less likely that the allocator can put things where you want.  That's
where the 10% free comes in.  That 10% is evenly distributed across
the disk (in theory) which makes it more likely that the allocator
can put things in the right place.

So, should you do it?  If you have an absolutely static disk, mounted
read only all the time,  then crank that %free down to 0, fill up
the disk and sleep easy.  If you have an active disk (/tmp or user
directories) then you should leave it at 10% if you want reasonable 
performance.

Oh - another consideration: if all of your files are very small,
less than the file system block size (usually 8K), then most of
this doesn't matter and you can crank it down to 2% w/o too much
trouble.
---
Larry McVoy, Sun Microsystems     (415) 336-7627       ...!sun!lm or lm at sun.com



More information about the Comp.unix.admin mailing list