public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Eric Sandeen <sandeen@sandeen.net>,
	Thomas Lynema <lyz27@yahoo.com>,
	xfs@oss.sgi.com
Subject: Re: Poor performance using discard
Date: Thu, 1 Mar 2012 01:31:13 -0500	[thread overview]
Message-ID: <20120301063113.GA15854@infradead.org> (raw)
In-Reply-To: <20120301062709.GB5091@dastard>

On Thu, Mar 01, 2012 at 05:27:09PM +1100, Dave Chinner wrote:
> One other thing the ext4 tracing implementation does is merge
> adjacent ranges, whereas the XFS implementation does not. XFS has
> more tracking complexity than ext4, though, in that it tracks free
> extents in multiple concurrent journal commits whereas ext4 only has
> to track across a single journal commit.  Hence ext4 can merge
> without having to care about where the adjacent range is being
> committed in the same journal checkpoint.
> 
> Further, ext4 doesn't reallocate from the freed extents until after
> the journal commit completes, whilst XFS can reallocate freed ranges
> before the freeing is journalled and hence can modify ranges in the
> free list prior to journal commit.
> 
> We could probably implement extent merging in the free extent
> tracking similar to ext4, but I'm not sure how much it would gain us
> because of the way we do reallocation of freed ranges prior to
> journal commit....

Also there generally aren't that many merging opportunities.  Back when
I implemented the code and looked at block traces we'd get them
occasionally:

 (a) for inode buffers due to the inode clusters beeing smaller than the
     inode chunks.  Better fixed by increasing the amount of inode
     clustering we do.
 (b) during rm -rf sometimes when lots of small files were end-to-end,
     but this doesn't happen all that often.

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

  reply	other threads:[~2012-03-01  6:31 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
2012-03-01  5:59         ` Christoph Hellwig
2012-03-01  6:27           ` Dave Chinner
2012-03-01  6:31             ` Christoph Hellwig [this message]
     [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=20120301063113.GA15854@infradead.org \
    --to=hch@infradead.org \
    --cc=david@fromorbit.com \
    --cc=lyz27@yahoo.com \
    --cc=sandeen@sandeen.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