disk fragmentation

Dan Nelson dnelson at allantgroup.com
Tue Feb 1 12:46:52 PST 2005


In the last episode (Feb 01), Jim Pazarena said:
> during the boot sequence, I routinely see a "% fragmentation
> message".
> 
> It was my understanding that fragmentation doesn't occur on a Unix
> (er FreeBSD) box..
> 
> It seems that there is a concept of fragmentation from the above
> message, so, is there an "un-fragment" utility?

In the ffs filesystem, a file that's smaller than the default 16k
blocksize (or the last part of a file that doesn't completely fit into
a block) doesn't have to waste an entire block.  Blocks can be split
into eight 2k fragments and small files are put in them.  The "%
fragmentation" is just the percentage of fragment blocks vs the total
number blocks.  It's more an indicator of how many small files you have
in the system than anything else.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list