Bill Moran wmoran at
Thu Mar 1 21:50:56 UTC 2007

In response to Ivan Voras <ivoras at>:

> Steve Franks wrote:
> > How come I never hear defrag come up as a topic, and can't find
> > anything related to defrag in the ports tree?  Is it really not an
> > issue on UFS?  Can someone point me to an explantion if so?
> fsck will tell you the level of fragmentation on the file system:
> > fsck /usr
> ** /dev/ad0s2g (NO WRITE)
> ** Last Mounted on /usr
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 352462 files, 2525857 used, 875044 free (115156 frags, 94986 blocks,
> 3.4% fragmentation)
> This is from a /usr system that's been in use for years. (note that
> "frags" in the last line refer to file system fragments - "subblocks",
> not fragmented files).

Just to reiterate:
"Fragmentation" on a Windows filesystem is _not_ the same as "fragmentation"
on a unix file system.  They are not comparable numbers, and do not mean
the same thing.  The only way to avoid fragmentation on a unix file system
is to make every file you create equal to a multiple of the block size.
And unix fragmentation does not degrade performance unless the file system
is close to full.

Bill Moran
Collaborative Fusion Inc.

More information about the freebsd-questions mailing list