Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jun 2007 12:45:33 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Richard Noorlandt <lists.freebsd@gmail.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: tunefs question
Message-ID:  <20070608120659.E75409@delplex.bde.org>
In-Reply-To: <99c92b5f0706070804p42da0881kfc866b192be60ed5@mail.gmail.com>
References:  <99c92b5f0706070804p42da0881kfc866b192be60ed5@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 7 Jun 2007, Richard Noorlandt wrote:

> While reading a bit about tunefs I noticed that UFS reserves 8% of the drive
> space for the root user and the system. However, I don't really understand
> what this space is actually used for. From the tunefs man page I understand
> that it is primarily used to guard against fragmentation, and that's about
> it. Is this the only thing that the reserved space is used for?

Yes.  Laying out files optimally is a hard problem, and leaving lots of
unused space simplifies the problem.

> And while I'm at it: what is the effect of the expected average file size
> option? What are the benefits and dangers of tweaking it?

Its main effect is to cause panics when it is set too high.  Similarly
for the average files per directory option -- set these so high that
their product overflows to cause undefined behaviour including panics.

Setting these options to non-overflowing values has subtle effects which
seem to be limited to limiting the number of directories per cylinder
group.  IMO, they are mainly debugging options for determining if the
subtle effects are ever large enough to be worth tuning for.  They are
documented mainly in a README or commit message.

> From the FreeBSD
> handbook I understand that the FS actually optimizes itself as time passes,
> but that's about all that's said about it.

No, ffs unoptimizes itself (becomes more fragmented) as time passes.
The reserved space limits the extent of the fragmentation or at least
the rate of growth of the fragmentation.  Fragmentation of old, nearly
full, ffs file systems can be very bad (maybe 10 times slower than a
new one).  Note that fsck only reports one sort of fragmentation which
is not the main one that slows down old file systems.

Bruce



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