xfs
[Top] [All Lists]

RE: Defrag Utility

To: LA Walsh <law@xxxxxxxxx>
Subject: RE: Defrag Utility
From: Stephen Lord <lord@xxxxxxx>
Date: 13 Nov 2002 19:45:07 -0600
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <001e01c28b7e$ae07eb90$1403a8c0@xxxxxxxxxxxx>
References: <001e01c28b7e$ae07eb90$1403a8c0@xxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Wed, 2002-11-13 at 19:39, LA Walsh wrote:

> 
> My system looks like: (files/dirs).
> /:
> xfs_db: actual 152457, ideal 152451, fragmentation factor 0.00%
> xfs_db: actual 4090, ideal 3459, fragmentation factor 15.43%
> /boot:
> xfs_db: actual 58, ideal 58, fragmentation factor 0.00%
> xfs_db: actual 2, ideal 2, fragmentation factor 0.00%
> /tmp:
> xfs_db: actual 6, ideal 6, fragmentation factor 0.00%
> xfs_db: actual 0, ideal 0, fragmentation factor 0.00%
> /var:
> xfs_db: actual 15924, ideal 14822, fragmentation factor 6.92%
> xfs_db: actual 276, ideal 206, fragmentation factor 25.36%
> /home:
> xfs_db: actual 104276, ideal 100041, fragmentation factor 4.06%
> xfs_db: actual 4586, ideal 4474, fragmentation factor 2.44%
> /backups:
> xfs_db: actual 1952, ideal 660, fragmentation factor 66.19%
> xfs_db: actual 16, ideal 11, fragmentation factor 31.25%
> ----
>       This is with no xfs_fsr (since it doesn't exist on my system)
> with
> fs's about 9 months old, maybe?
> 
>       Looks like I could use a good xfs_fsr.  Am running SuSE8.1 and
> doesn't appear they included it.

I don't think you do, if you look at the actual numbers, only one
filesystem is really fragmented, the /backups one, and it does
not have many files. Also you cannot defragment directories.

We package fsr with dump/restore which is a separate rpm, so
see if you have on of those.

>       
> > 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
> ---
> So, ideally, would all of the extent ranges have at most 1 extent --
> except
> for the 32768-65535 range which would have some number of extents
> equivalent to something close to free blocks/64K?

No, these are just arbitary buckets for reporting purposes, you
can make it output it differently I think.


> As for me doing 'timings and testings'...I can add that to my
> 'list'...of
> things it would 'be good to do'...:-).  Seriously though -- perhaps I am
> naïve, but someone must have thought there was some benefit to be gained
> by
> having a defrag utility for xfs.  As mentioned -- it's not that common
> on
> *nixes.  So I'm wondering what/who (maybe unknown after many years)
> prompted
> the creation of such a utility.  Someone must have thought either
> thought
> it was needed or that it would make a difference.  I realize, though,
> that
> doesn't mean there was any hard evidence and could have been added on a
> whim :-).
> 
> linda
> 

It was written for some media customers who were managing to create
pathologically fragmented files which could not then be streamed
of the disk at a decent speed. If you know how to you can make
xfs fragment files really badly.

Steve




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