xfs
[Top] [All Lists]

Re: Defrag Utility

To: Andi Kleen <ak@xxxxxxx>
Subject: Re: Defrag Utility
From: Stephen Lord <lord@xxxxxxx>
Date: 13 Nov 2002 16:21:45 -0600
Cc: LA Walsh <law@xxxxxxxxx>, linux-xfs@xxxxxxxxxxx
In-reply-to: <20021113231558.A2917@oldwotan.suse.de>
References: <20021102230344.GA7854@tapu.f00f.org> <000301c28b60$65e5b770$1403a8c0@sc.tlinx.org> <20021113231558.A2917@oldwotan.suse.de>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Wed, 2002-11-13 at 16:15, Andi Kleen wrote:
> On Wed, Nov 13, 2002 at 02:02:46PM -0800, LA Walsh wrote:
> > Is there any tool to tell how many files have how many fragments out of
> > how many files...something on the order of
> 
> xfs_bmap reports that. The more extents the file has the more fragmented
> it is.
> 
> -Andi
> 

Try the frag and freesp commands in xfs_db one reports how fragmented
things are. So for instance on the laptop I am on which I do kernel
builds on:

xfs_db: frag -f
actual 79844, ideal 79633, fragmentation factor 0.26%
xfs_db: frag -d
actual 2316, ideal 2249, fragmentation factor 2.89%

The first is file data, the second is directory blocks.

Then freesp lists the sizes of freespace:

   from      to extents  blocks    pct
      1       1     461     461   0.11
      2       3     335     776   0.18
      4       7     215    1135   0.26
      8      15     231    2611   0.60
     16      31     149    3249   0.75
     32      63     155    6930   1.60
     64     127     153   13900   3.21
    128     255     139   25120   5.80
    256     511      80   29159   6.74
    512    1023      40   26903   6.21
   1024    2047      12   17903   4.14
   2048    4095       6   18091   4.18
   4096    8191       1    4628   1.07
   8192   16383       1   14674   3.39
  32768   65535       5  267378  61.76

This filesystem has been in use for a couple of years (I think)

Steve


Steve



<Prev in Thread] Current Thread [Next in Thread>