xfs
[Top] [All Lists]

Re: Poor performance using discard

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: Poor performance using discard
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 1 Mar 2012 01:31:13 -0500
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Eric Sandeen <sandeen@xxxxxxxxxxx>, Thomas Lynema <lyz27@xxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20120301062709.GB5091@dastard>
References: <1330469778.9688.7.camel@core24> <20120229012259.GW3592@dastard> <1330480826.9688.23.camel@core24> <20120229040819.GZ3592@dastard> <4F4E809A.40308@xxxxxxxxxxx> <20120301055943.GA23051@xxxxxxxxxxxxx> <20120301062709.GB5091@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
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.

<Prev in Thread] Current Thread [Next in Thread>