Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2002 18:00:45 -0400
From:      Bill Vermillion <bv@wjv.com>
To:        freebsd-fs@freebsd.org
Subject:   Re: optimization changed from TIME to SPACE ?!
Message-ID:  <20020826220045.GB27088@wjv.com>
In-Reply-To: <20020826204811.GA337@HAL9000.homeunix.com>
References:  <31269226357BD211979E00A0C9866DAB02BB998B@rios.sitaranetworks.com> <20020826204811.GA337@HAL9000.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
-segmentation fault- 
press any key to reboot 
Damn damn damn David Schultz said, after restarting his 
PC and mailer on Mon, Aug 26, 2002 at 13:48 .

> Thus spake Chris Ptacek <cptacek@sitaranetworks.com>:

> > What actually causes the fragmentation to occur?  

Read the docs or take a look at one of the books on the BSD file
system to explain it fully.

> I'm not an expert on FFS, but hopefully someone will correct me if
> I have missed something.
....

> One problem with fragments is that dealing with them can be
> inefficient.  If your 9K file grows to a 12K file, then to a 14K
> file, then to a 16K file, the filesystem may have to copy
> fragments around in order to fit all of the fragments for the end
> of the file into a single block.

But at the point the files goes to 16K it has no fragmentation at
all and there is a good chance those two 8K allocation units will
be contiguous.  The FFS systme is good at this.

> This is the kind of
> fragmentation fsck is telling you about.  If you have FFS optimize
> for space, it will happily manage all of these fragments for you.
> If you tell it to optimize for time, FFS will still use fragments,
> but it won't bother to keep reallocating them when a file grows;
> instead, it will upgrade the file to a full block.  The latter
> method is more efficient, but you lose a bit more space due to
> internal fragmentation.  Thus, if FFS expects to run out of space,
> or if there are too many free fragments lying around, it will
> revert to space optimization until the situation improves.

I've been using FFS style systems since about 1993 - and I really
like them.   If you do get to the poinn where you see optimization
changed from time to space - then it's time to get a bigger drive
or get rid of some of the cruft.

Bill
-- 
Bill Vermillion - bv @ wjv . com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




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