xfs
[Top] [All Lists]

Re: file system defragmentation

To: Jan-Frode Myklebust <Jan-Frode.Myklebust@xxxxxxxxxxx>
Subject: Re: file system defragmentation
From: Fong Vang <sudoyang@xxxxxxxxx>
Date: Fri, 26 Aug 2005 08:48:47 -0700
Cc: linux-xfs@xxxxxxxxxxx
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cDy4XLOoeidz9MyGo/94YKkABWUb7A+5pRVziJ/iVbIkIZas0QwuqZp+nCIGZU40wUUpqFsoaw5oVc31m6gZC0COVT/vKxXcSBu1uB3ynFRaOHaulwKz8OTUWmhUOsLHuToW/2wjftzK7hLVcVo1Wjs2LOnYY/lxM+1hQp/PTtU=
In-reply-to: <20050826101131.GA24544@xxxxxxxxx>
References: <4f52331f050826001612f8e323@xxxxxxxxxxxxxx> <20050826101131.GA24544@xxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
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>