Filesystem fragmentation and scatter-gather DMA

Jon Forrest jlforrest at
Mon Mar 17 17:24:56 UTC 2008

Ric Wheeler wrote:

> Every level of the the system tries to guess how to combine and read 
> ahead, all the way from the file system down to the internal firmware in 
>  the storage.

I remember Kirk McKusick once complaining about how hard it was to write
a file system when so many other levels in a system try to second guess
what he was trying to do. I've also heard disk engineers complain about
the same thing, except they complain about the OS people not leaving
optimization techniques to them. Go figure.

> I think that fragmentation is a bad performance hit, but that we 
> actually do relatively well in keeping our files contiguous in normal 
> cases.

We might disagree on how bad the performance hit is, but I'm really
trying to prevent non-technical people from panicking when they see
a fragmented filesystem (or file).

> I have a simple bit of c code that uses fibmap to dump the 
> sectors/blocks for a specific file. If you like, I can send it over to you.

Sure. Thanks.

Jon Forrest
Research Computing Support
College of Chemistry
173 Tan Hall
University of California Berkeley
Berkeley, CA
jlforrest at

More information about the Ext3-users mailing list