[Linux-cluster] defragmentation.....

Steven Whitehouse swhiteho at redhat.com
Thu Jun 2 09:46:51 UTC 2011


On Thu, 2011-06-02 at 10:34 +0100, Alan Brown wrote:
> GFS2 seems horribly prone to fragmentation.
> I have a filesystem which has been written to once (data archive, 
> migrated from a GFS1 filesystem to a clean GFS2 fs) and a lot of the 
> files are composed of hundreds of extents - most of these are only 1-2Mb 
> so this is a bit over the top and it badly affects backup performance.
> Has there been any progress on tools to help with this kind of problem?
> Alan
The thing to check is what size the extents are... the on-disk layout is
designed so that you should have a metadata block separating each data
extent at exactly the place where we would need to read a new metadata
block in order to continue reading the file in a streaming fashion.

That means on a 4k block size filesystem, the data extents are usually
around 509 blocks in length, and if you see a number of these with
(mostly) a single metadata block between them (sometimes more if the
height of the metadata tree grows) then that is the expected layout.

Fragmentation tends to be more of an issue with directories than with
regular files, and that is something that we are looking into at the


More information about the Linux-cluster mailing list