public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: AndCycle <andcycle@andcycle.idv.tw>
Cc: xfs@oss.sgi.com
Subject: Re: xfs_fsr defrag top 10% that have the largest number of extents??
Date: Wed, 31 Mar 2010 15:00:15 +1100	[thread overview]
Message-ID: <20100331040015.GT3335@dastard> (raw)
In-Reply-To: <4BB27AFE.2030205@andcycle.idv.tw>

On Wed, Mar 31, 2010 at 06:28:14AM +0800, AndCycle wrote:
> my xfs_fsr version is xfsdump_2.2.48-1,
> 
> there is a description in xfs_fsr man said
> "
> When invoked with no arguments xfs_fsr reorganizes all regular files
> in all mounted filesystems.
> (...)
> Each pass goes through and selects files that have the largest
> number of extents.  It attempts to defragment the top 10% of these
> files on each pass.
> "
> but xfs_fsr -d telling me it defrags in inode ascending order,
> 
> http://pastebin.com/h0RyZkwA

Look a little closer:

           vvvvvvvvvvvv
ino=603561 extents=1815 can_save=1814 tmp=/.fsr/ag2/tmp14298
ino=12652801 extents=208 can_save=207 tmp=/.fsr/ag2/tmp14298
ino=12652802 extents=164 can_save=163 tmp=/.fsr/ag3/tmp14298
ino=13245759 extents=2 can_save=1 tmp=/.fsr/ag0/tmp14298
ino=77725409 extents=11 can_save=10 tmp=/.fsr/ag3/tmp14298
ino=78685589 extents=2 can_save=1 tmp=/.fsr/ag0/tmp14298
ino=538183901 extents=2 can_save=1 tmp=/.fsr/ag3/tmp14298
ino=543424932 extents=2 can_save=1 tmp=/.fsr/ag0/tmp14298
              ^^^^^^^^^

Apart from ino=77725409, they are in order of most extents to least
extents. Maybe the qsort() library function that is used is not
sorting everything correctly, but overall it looks like it is doing
pretty much what the man page says. The ascending order of the inode
numbers is really just a co-incidence.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2010-03-31  3:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30 22:28 xfs_fsr defrag top 10% that have the largest number of extents?? AndCycle
2010-03-31  4:00 ` Dave Chinner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100331040015.GT3335@dastard \
    --to=david@fromorbit.com \
    --cc=andcycle@andcycle.idv.tw \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox