public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Monnerie <michael.monnerie@is.it-management.at>
To: xfs@oss.sgi.com
Subject: xfs_fsr question for improvement
Date: Fri, 16 Apr 2010 10:43:10 +0200	[thread overview]
Message-ID: <201004161043.11243@zmi.at> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2816 bytes --]

From the man page I read that a file is defragmented by copying it to a 
free space big enough to place it in one extent.

Now I have a 4TB filesystem, where all files written are at least 1GB, 
average 5GB, up to 30GB each. I just xfs_growfs'd that filesystem to 
6TB, as it was 97% full (150GB free). Every night a xfs_fsr runs and 
finished to defragment everything, except during the last days where it 
didn't find enough free space in a row to defragment.

Could it be that the defragmentation did it's job but in the end the 
file layout was like this:
file 1GB
freespace 900M
file 1GB
freespace 900M
file 1GB
freespace 900M
That, while being an "almost worst case" scenario, would mean that once 
the filesystem is about 50% full, new 1GB files will be fragmented all 
the time.
To prevent this, xfs_fsr should do a "compress" phase after 
defragmentation finished, in order to move all the files behind each 
other:
file 1GB
file 1GB
file 1GB
file 1GB
freespace 3600M
That would also help fill the filesystem from front to end, reducing 
disk head moves.


Another thing, but related to xfs_fsr, is that I did an xfs_repair on 
that filesystem once, and I could see there were a lot of small I/Os 
done, with almost no throughput. The disks are 7.200rpm 2TB disks, so 
random disk access is horribly slow, and it looked like the disks were 
doing nothing else but seeking.
Would it be possible xfs_fsr defrags the meta data in a way that they 
are all together so seeks are faster?
Currently, when I do "find /this_big_fs -inum 1234", it takes *ages* for 
a run, while there are not so many files on it:
# iostat -kx 5 555
Device:         r/s     rkB/s    avgrq-sz avgqu-sz   await  svctm  %util
xvdb              23,20    92,80     8,00     0,42   15,28  18,17  42,16
xvdc              20,20    84,00     8,32     0,57   28,40  28,36  57,28
(I edited the output to remove "writes" columns, as they are 0)
This is a RAID-5 over 7 disks, and 2 TB volumes are used with LVM 
concatenated. As I only added the 3rd 2TB volume today, no seeks on that 
new place.
So I get 43 reads/second at 100% utilization. Well I can see up to 
150r/s, but still that's no "wow". A single run to find an inode takes a 
very long time.
# df -i
Filesystem            Inodes         IUsed          IFree      IUse%
mybigstore            1258291200  765684 1257525516    1%

So only 765.684 files, and it takes about 8 minutes for a "find" pass.
Maybe an xfs_fsr over metadata could help here?


-- 
mit freundlichen Grüssen,
Michael Monnerie, Ing. BSc

it-management Internet Services
http://proteger.at [gesprochen: Prot-e-schee]
Tel: 0660 / 415 65 31

// Wir haben im Moment zwei Häuser zu verkaufen:
// http://zmi.at/langegg/
// http://zmi.at/haus2009/

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

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

             reply	other threads:[~2010-04-16  8:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-16  8:43 Michael Monnerie [this message]
2010-04-16 10:43 ` xfs_fsr question for improvement Stan Hoeppner
2010-04-17  1:24 ` Dave Chinner
2010-04-17  7:13   ` Emmanuel Florac
2010-04-25 11:17     ` Peter Grandi
2010-04-25 13:02       ` Emmanuel Florac
2010-04-25 21:04         ` Eric Sandeen
2010-04-25 21:44           ` Emmanuel Florac
2010-04-26  0:02       ` Linda Walsh
2010-05-03  6:49   ` Michael Monnerie
2010-05-03  7:41     ` Michael Monnerie
2010-05-03 12:17     ` Dave Chinner
2010-05-10 22:39       ` Michael Monnerie
  -- strict thread matches above, loose matches on Subject: below --
2010-04-26 20:58 Richard Scobie

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=201004161043.11243@zmi.at \
    --to=michael.monnerie@is.it-management.at \
    --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