Subject: Re: defragment drive?
To: Chuck Yerkes <chuck+nbsd@2002.snew.com>
From: David Laight <david@l8s.co.uk>
List: netbsd-help
Date: 10/29/2002 18:27:54
> And yet a client just spent a very expensive night doing overnight
> emergency consulting when his 87% full disk wouldn't write any more
> files due to excessive fragmentation.  It's rare and had he used
> VxFS as we recommended (solaris), he wouldn't have had the problem.

That isn't a performance issue though!

What happens is that large files (and everything except the last
block) has to be allocated as a block (typically 8k).  The
trailing part of small files is allocated as a number (up to 7)
fragments (typically 1k), they must be contiguous on disk but
need not be on a block boundary.

Clearly it is possible for all the free space to be in part used
blocks and you to fail to find a complete free block.

IIRC the system will initilly allocate all 'fragments' at the
start of blocks.  When the filesystem is a certain % full
it will switch to filling up blocks that contain other fragments.

The 'windows' defrag is all about moving the blocks of a file to
be contiguous(ish) to each other to reduce disk seeks.
FFS doesn't need that.

	David

-- 
David Laight: david@l8s.co.uk