From: Norbert Veber <nveber@pyre.virge.net>
To: xfs@oss.sgi.com
Subject: Small files perform much faster on newly formatted fs?
Date: Tue, 7 Jun 2011 12:37:42 -0400 [thread overview]
Message-ID: <20110607163742.GH28625@pyre.virge.net> (raw)
Hi,
I have some xfs filesystems on my computer running linux. These were
created (formatted) about 2 years ago on debian 5.0 on software raid
5+lvm. I am getting pretty terible performance with small files, and
decided to try to optimize that a bit with some mount options etc.
I also created a new filesystem to try different mkfs options. This was
done on the same computer which has since been upgraded to debian 6.0.
I found a very suprising thing. The new filesystem performed an order
of magnitude faster than the 2 year old filessytem which has made with
an older kernel and older mkfs.xfs (from debian 5.0).
For a simple test I tried to time the untar and rm -rf on the linux
2.6.32 source tree. Its not very scientific but I get pretty consistent
results. Old 20gb filessystem:
pyre:/shared# xfs_info /shared
meta-data=/dev/mapper/vg0-shared isize=256 agcount=9, agsize=610304
blks
= sectsz=512 attr=2
data = bsize=4096 blocks=5062656, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=0
realtime =none extsz=4096 blocks=0, rtextents=0
Since sunit and swidth wasnt automatically set by the old debian 5 mkfs
time, I use the mount options isntead:
nveber@pyre[6788:~/files/doc]$ mount | grep shared
/dev/mapper/vg0-newshared on /mnt/tmp type xfs (rw)
/dev/mapper/vg0-shared on /shared type xfs (rw,sunit=128,swidth=256)
Now for the "benchmark":
pyre:/shared# sync;sleep 15s;time ionice -c1 tar -zxf linux-2.6_2.6.32.orig.tar.gz
real 3m6.842s
user 0m3.800s
sys 0m2.692s
New 30gb filesystem:
pyre:/shared# xfs_info /mnt/tmp
meta-data=/dev/mapper/vg0-newshared isize=256 agcount=16,
agsize=491504 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=7864064, imaxpct=25
= sunit=16 swidth=32 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=3840, version=2
= sectsz=512 sunit=16 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
pyre:/mnt/tmp# sync;sleep 15s;time ionice -c1 tar -zxf
linux-2.6_2.6.32.orig.tar.gz
real 0m19.851s
user 0m3.828s
sys 0m2.184s
20 seconds vs 3+ minutes?! The only difference I can see is
lazy-count=1 and a larger agcount. Sunit and swidth were also set
automatically by mkfs this time. I tried the lazy-count option for the
old fs:
pyre:~# umount /shared
pyre:~# xfs_admin -c1 /dev/vg0/shared
Enabling lazy-counters
pyre:~# mount /shared
pyre:/shared# mv linux-2.6-2.6.32/ deleteme
pyre:/shared# sync;sleep 15s;time ionice -c1 tar -zxf linux-2.6_2.6.32.orig.tar.gz
real 2m37.634s
user 0m3.800s
sys 0m2.612s
Its a little faster now, but still way slower than the new fs. Whats
the difference, and how can I make the old one perform at this level
short of reformatting? :)
Thanks,
Norbert
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2011-06-07 16:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 16:37 Norbert Veber [this message]
2011-06-08 7:11 ` Small files perform much faster on newly formatted fs? Michael Monnerie
2011-06-08 12:26 ` Norbert Veber
2011-06-08 13:47 ` Michael Monnerie
2011-06-08 18:58 ` Norbert Veber
2011-06-09 5:44 ` Michael Monnerie
2011-06-08 20:52 ` Eric Sandeen
2011-06-08 21:16 ` Eric Sandeen
2011-06-09 1:29 ` Dave Chinner
2011-06-09 8:22 ` Christoph Hellwig
2011-06-09 13:48 ` Norbert Veber
2011-06-09 16:30 ` Michael Monnerie
2011-06-09 20:30 ` Norbert Veber
2011-06-09 21:17 ` Dave Chinner
2011-06-10 0:54 ` Norbert Veber
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=20110607163742.GH28625@pyre.virge.net \
--to=nveber@pyre.virge.net \
--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