xfs
[Top] [All Lists]

RE: file system defragmentation

Subject: RE: file system defragmentation
From: "Wilkins, Vern" <vwilkins@xxxxxxxxxxx>
Date: Fri, 26 Aug 2005 11:19:52 -0500
Cc: <linux-xfs@xxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
Thread-index: AcWqVbmBVTGYpCZNRf2WLdsWanmsuQAA5CiT
Thread-topic: file system defragmentation
I agree, all the talk of certain filesystems not needing defragmentation (not 
just XFS), is all just talk.  In the real world I have seen heavy 
defragmentation on all my machines, regardless of filesystem.  All it takes is 
a limited amount of freespace and/or a lot of file creation/deletion.  Mail 
servers as already mentioned are a good example of the heavy file 
creation/deletion scenario, as are audio/video editing workstations.  On a/v 
editing workstations I have seen greater than 90% fragmentation in a fairly 
short time using virtually any filesystem.  The ability to easily defrag XFS is 
pretty significant in my choice of filesystems.


-----Original Message-----
From:   linux-xfs-bounce@xxxxxxxxxxx on behalf of Fong Vang
Sent:   Fri 8/26/2005 10:48 AM
To:     Jan-Frode Myklebust
Cc:     linux-xfs@xxxxxxxxxxx
Subject:        Re: file system defragmentation
On 8/26/05, Jan-Frode Myklebust <Jan-Frode.Myklebust@xxxxxxxxxxx> wrote:
> On Fri, Aug 26, 2005 at 12:16:16AM -0700, Fong Vang wrote:
> > I've read in many places that file systems on Linux do not suffer the
> > same fragmentation problems of Windows systems.  No one has provided a
> > clear explanation as to why fragmentation is not an issue for file
> > systems such as XFS.
> 
> 
> I think it is a problem for XFS also.. at least for our slow growing
> mailserver with lots of mbox-files.
> 
> 
> > Also, is there a way to determine the percentage of fragmentation on
> > an XFS file system?
> 
>   # xfs_db -c frag -r /dev/sdc1
>   actual 59707, ideal 46970, fragmentation factor 21.33%
> 
> and individual file fragmentation can be checked with xfs_bmap:
> 
>   # xfs_bmap usersmbox
>   usersmbox:
>         0: [0..744815]: 31464808..32209623
>         1: [744816..744831]: 31464792..31464807
>         2: [744832..744959]: 31464664..31464791
>         3: [744960..745063]: 31464048..31464151
>         4: [745064..745215]: 31463896..31464047
>         5: [745216..745335]: 31463768..31463887
>         6: [745336..745471]: 31463632..31463767
>         7: [745472..745583]: 31463504..31463615
> 
> and you can defrag either individual files:
> 
>   # xfs_fsr usersmbox
>   # xfs_bmap usersmbox
>   usersmbox:
>         0: [0..747423]: 142372792..143120215
> 
> or a whole live partiion:
> 
>   # xfs_fsr /dev/sdc1
> 
> (btw: i think xfs_db -c frag will be a bit slow in reporting the updated
> fragmentation after a xfs_fsr, at least that's the impression I got
> the last time I ran it)

This is very useful.  Thank you.  How stable is xfs_fsr?
 
>   -jf
>









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