public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Dave Chinner <david@fromorbit.com>
Cc: Thomas Lynema <lyz27@yahoo.com>, xfs@oss.sgi.com
Subject: Re: Poor performance using discard
Date: Wed, 29 Feb 2012 13:46:34 -0600	[thread overview]
Message-ID: <4F4E809A.40308@sandeen.net> (raw)
In-Reply-To: <20120229040819.GZ3592@dastard>

On 2/28/12 10:08 PM, Dave Chinner wrote:

> Also, I think you need to provide a block trace (output of
> blktrace/blkparse for the rm -rf workloads) for both the XFS and
> ext4 cases so we can see what discards are actually being issued and
> how long they take to complete....
> 

I ran a quick test on a loopback device on 3.3.0-rc4.  Loopback supports
discards.  I made 1G filesystems on loopback on ext4 & xfs, mounted with
-o discard, cloned a git tree to them, and ran rm -rf; sync under blktrace.

XFS took about 11 seconds, ext4 took about 1.7.

(without trim, times were roughly the same - but discard/trim is probably
quite fast on the looback file)

Both files were reduced in disk usage about the same amount, so online
discard was working for both:

# du -h ext4_fsfile xfs_fsfile
497M	ext4_fsfile
491M	xfs_fsfile

XFS issued many more discards than ext4:

# blkparse xfs.trace | grep -w D | wc -l
40205
# blkparse ext4.trace | grep -w D | wc -l
123

XFS issued many small discards (4k/8 sectors) and a few larger ones:

[sectors | # discards]

8 20079
16 6762
24 3627
32 2798
40 1439
...
1840 1
7256 1
26720 1

ext4 issued far fewer discards, but in much larger chunks:

8 29
16 9
24 4
32 6
...
35152 1
35248 1
53744 1
192320 1
261624 1
262144 1

So that could certainly explain the relative speed.

-Eric

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

  parent reply	other threads:[~2012-02-29 19:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28 22:56 Poor performance using discard Thomas Lynema
2012-02-28 23:58 ` Peter Grandi
2012-02-29  1:22 ` Dave Chinner
2012-02-29  2:00   ` Thomas Lynema
2012-02-29  4:08     ` Dave Chinner
2012-02-29 10:38       ` Peter Grandi
2012-02-29 19:46       ` Eric Sandeen [this message]
2012-03-01  5:59         ` Christoph Hellwig
2012-03-01  6:27           ` Dave Chinner
2012-03-01  6:31             ` Christoph Hellwig
     [not found]       ` <1330658311.6438.24.camel@core24>
2012-03-02 14:57         ` Thomas Lynema
2012-03-02 15:41       ` Thomas Lynema
2012-03-05  3:02         ` Dave Chinner
2012-03-05  6:41           ` Jeffrey Hundstad

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=4F4E809A.40308@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=david@fromorbit.com \
    --cc=lyz27@yahoo.com \
    --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