xfs
[Top] [All Lists]

Re: Ext4 and xfs problems in dm-thin on allocation and discard

To: Mike Snitzer <snitzer@xxxxxxxxxx>
Subject: Re: Ext4 and xfs problems in dm-thin on allocation and discard
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 20 Jun 2012 06:06:31 +1000
Cc: Spelic <spelic@xxxxxxxxxxxxx>, Lukáš Czerner <lczerner@xxxxxxxxxx>, device-mapper development <dm-devel@xxxxxxxxxx>, linux-ext4@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <20120619184858.GA8841@xxxxxxxxxx>
References: <4FDF9EBE.2030809@xxxxxxxxxxxxx> <20120619015745.GJ25389@dastard> <20120619031241.GA3884@xxxxxxxxxx> <alpine.LFD.2.00.1206190816440.2241@xxxxxxxxxxxxxxxxxxxxxxxxx> <20120619131649.GA6811@xxxxxxxxxx> <alpine.LFD.2.00.1206191519320.21961@xxxxxxxxxxxxxxxxxxxxxxxxx> <20120619133041.GB6811@xxxxxxxxxx> <4FE0840F.2050704@xxxxxxxxxxxxx> <20120619144413.GA7225@xxxxxxxxxx> <20120619184858.GA8841@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Jun 19, 2012 at 02:48:59PM -0400, Mike Snitzer wrote:
> On Tue, Jun 19 2012 at 10:44am -0400,
> Mike Snitzer <snitzer@xxxxxxxxxx> wrote:
> 
> > On Tue, Jun 19 2012 at  9:52am -0400,
> > Spelic <spelic@xxxxxxxxxxxxx> wrote:
> >
> > > I do not know what is the mechanism for which xfs cannot unmap
> > > blocks from dm-thin, but it really can't.
> > > If anyone has dm-thin installed he can try. This is 100%
> > > reproducible for me.
> > 
> > I was initially surprised by this considering the thinp-test-suite does
> > test a compilebench workload against xfs and ext4 using online discard
> > (-o discard).
> > 
> > But I just modified that test to use a thin-pool with 'ignore_discard'
> > and the test still passed on both ext4 and xfs.
> > 
> > So there is more work needed in the thinp-test-suite to use blktrace
> > hooks to verify that discards are occuring when the compilebench
> > generated files are removed.
> > 
> > I'll work through that and report back.
> 
> blktrace shows discards for both xfs and ext4.
> 
> But in general xfs is issuing discards with much smaller extents than
> ext4 does, e.g.:

THat's normal when you use -o discard - XFS sends extremely
fine-grained discards as the have to be issued during the checkpoint
commit that frees the extent. Hence they can't be aggregated like is
done in ext4.

As it is, no-one really should be using -o discard - it is extremely
inefficient compared to a background fstrim run given that discards
are unqueued, blocking IOs. It's just a bad idea until the lower
layers get fixed to allow asynchronous, vectored discards and SATA
supports queued discards...

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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