Re: Any way to slow down fragmentation ?

Dave Chinner
2015-10-14T21:35:37Z

On Wed, Oct 14, 2015 at 01:36:48PM -0500, Eric Sandeen wrote:
>
>
> On 10/14/15 1:29 PM, Cédric Lemarchand wrote:
> > Well .. it seems I missed the most important part of the FAQ, thank
> > for pointing it. As you stated, playing with xfs_bmap shows that the
> > 13TB file is fragmented a lot, xfs_fsr is now working on it.
>
> how much was "a lot?"
>
> a 13TB file can have "a lot" of *very* large extents.

With the maximum extent size being 8GB, a file that large going to
see "a lot" of extents even if it isn't fragmented. It will be
spread out over multiple AGs (being 1TB max in size), and that makes
it *appear* worse than it really is. Indeed, the best case is that
the BMBT will have ~1700 extent records in it for a file that
size, so it may appear to be fragmented when it really isn't.

Fragmentation is not measured by "having lots of extents in a file".
The extent layout of a file needs to be measured against the pattern
and size of the IOs the application does to that file - the file is
not fragmented if the size and/or packing of extents is optimal for
the access patterns of the application, regardless of the number of
extents in the file...

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com