From: Dave Chinner <david@fromorbit.com>
To: Chris Mason <chris.mason@fusionio.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [3.9] parallel fsmark perf is real bad on sparse devices
Date: Sun, 5 May 2013 11:45:40 +1000 [thread overview]
Message-ID: <20130505014540.GF19978@dastard> (raw)
In-Reply-To: <20130504112005.5844.26279@localhost.localdomain>
On Sat, May 04, 2013 at 07:20:05AM -0400, Chris Mason wrote:
> Quoting Dave Chinner (2013-05-03 21:15:47)
> > Hi folks,
> >
> > It's that time again - I ran fsmark on btrfs and found performance
> > was awful.
> >
> > tl;dr: memory pressure causes random writeback of metadata ("bad"),
> > fragmenting the underlying sparse storage. This causes a downward
> > spiral as btrfs cycles through "good" IO patterns that get
> > fragmented at the device level due to the "bad" IO patterns
> > fragmenting the underlying sparse device.
> >
>
> Really interesting Dave, thanks for all this analysis.
>
> We're going to have hard time matching xfs fragmentation just because
> the files are zero size and we don't have the inode tables. But, I'll
> take a look at the metadata memory pressure based writeback, sounds like
> we need to push a bigger burst.
Yeah, I wouldn't expect it to behave like XFS does given all the
metadata writeback ordering optimisation XFS has, but the level of
fragmentation was a surprise. Fragmentation by itself isn't so much
of a problem - ext4 is just as bad as btrfs in terms of the amount of
image fragmentation, but it doesn't have the 100:1 IOPS explosion in
the backing device.
Run the test and have a look at the iowatcher movies - they
are quite instructive as they show the two separate phases
that write alternately over the same sections of the disk. A
picture^Wmovie is worth a thousand words ;)
FWIW, the main reason I thought it is important enough to report
because if the filesystem is being unfriendly to sparse files, then
it is almost certainly being unfriendly to the internal mapping
tables in modern SSDs....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2013-05-05 1:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-04 1:15 [3.9] parallel fsmark perf is real bad on sparse devices Dave Chinner
2013-05-04 11:20 ` Chris Mason
2013-05-05 1:45 ` Dave Chinner [this message]
2013-05-05 14:56 ` [BULK] " Chris Mason
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=20130505014540.GF19978@dastard \
--to=david@fromorbit.com \
--cc=chris.mason@fusionio.com \
--cc=linux-btrfs@vger.kernel.org \
/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