public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Spelic <spelic@shiftmail.org>
Cc: "Lukáš Czerner" <lczerner@redhat.com>,
	"device-mapper development" <dm-devel@redhat.com>,
	linux-ext4@vger.kernel.org, "Mike Snitzer" <snitzer@redhat.com>,
	xfs@oss.sgi.com
Subject: Re: Ext4 and xfs problems in dm-thin on allocation and discard
Date: Wed, 20 Jun 2012 09:12:52 +1000	[thread overview]
Message-ID: <20120619231252.GQ25389@dastard> (raw)
In-Reply-To: <4FE0F132.2080207@shiftmail.org>

On Tue, Jun 19, 2012 at 11:37:54PM +0200, Spelic wrote:
> On 06/19/12 22:06, Dave Chinner wrote:
> >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@redhat.com>  wrote:
> >>
> >>>On Tue, Jun 19 2012 at  9:52am -0400,
> >>>Spelic<spelic@shiftmail.org>  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...
> >
> 
> Could it be that the thin blocksize is larger than the discard
> granularity by xfs so nothing ever gets unmapped?

for -o discard, possibly. for fstrim, unlikely.

> I have tried thin pools with the default blocksize (64k afair with
> lvm2) and 1MB.
> HOWEVER I also have tried fstrim on xfs, and that is also not
> capable to unmap things from the dm-thin.
> What is the granularity with fstrim in xfs?

Whatever granularity you passed fstrim. You need to run an event
trace on XFS to find out if it is issuing discards before going
any further..

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

  reply	other threads:[~2012-06-19 23:12 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-18 21:33 Ext4 and xfs problems in dm-thin on allocation and discard Spelic
2012-06-19  1:57 ` Dave Chinner
2012-06-19  3:12   ` Mike Snitzer
2012-06-19  6:32     ` Lukáš Czerner
2012-06-19 11:29       ` Spelic
2012-06-19 12:20         ` Lukáš Czerner
2012-06-19 13:34         ` Mike Snitzer
2012-06-19 13:16       ` Mike Snitzer
2012-06-19 13:25         ` Lukáš Czerner
2012-06-19 13:30           ` Mike Snitzer
2012-06-19 13:52             ` Spelic
2012-06-19 14:05               ` Eric Sandeen
2012-06-19 14:44               ` Mike Snitzer
2012-06-19 18:48                 ` Mike Snitzer
2012-06-19 20:06                   ` Dave Chinner
2012-06-19 20:21                     ` Ted Ts'o
2012-06-19 20:39                       ` Dave Chinner
2012-06-20  9:01                         ` Christoph Hellwig
2012-06-19 21:37                     ` Spelic
2012-06-19 23:12                       ` Dave Chinner [this message]
2012-06-20 12:11   ` Spelic
2012-06-20 22:53     ` Dave Chinner
2012-06-21 17:47       ` Mike Snitzer
2012-06-21 23:29         ` Dave Chinner
2012-07-01 14:53         ` Paolo Bonzini
2012-07-02 13:00           ` Mike Snitzer
2012-07-02 13:15             ` Paolo Bonzini
2012-06-19 14:09 ` Lukáš Czerner
2012-06-19 14:19   ` Ted Ts'o
2012-06-19 14:23     ` Eric Sandeen
2012-06-19 14:37     ` Lukáš Czerner
2012-06-19 14:43     ` [dm-devel] " Alasdair G Kergon
2012-06-19 15:28       ` Mike Snitzer
2012-06-19 16:03         ` [dm-devel] " Alasdair G Kergon
2012-06-19 19:58         ` Ted Ts'o
2012-06-19 20:44           ` Mike Snitzer

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=20120619231252.GQ25389@dastard \
    --to=david@fromorbit.com \
    --cc=dm-devel@redhat.com \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=snitzer@redhat.com \
    --cc=spelic@shiftmail.org \
    --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