[Top] [All Lists]


To: Michael Monnerie <michael.monnerie@xxxxxxxxxxxxxxxxxxx>
Subject: Re: TRIM on XFS
From: Greg Freemyer <greg.freemyer@xxxxxxxxx>
Date: Mon, 10 Oct 2011 16:28:33 -0400
Cc: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=gqic/8NaKPekOzj9mH/m2G2Zi1X5yHPiP1K3i4oXlV0=; b=C1quuYlynPqOSHU3aC3KL8T7bFMFMvwyOGuWeXBd/W11DZDrl/iBJtqVHERz4SVm+d JJJLraTG9n2IqyAvtoN5YXSVr6H6qeMjLB5SyhO07CPY9dMmfP1EW3X8sC5bX5uWBgDr vsMNTx70XLnspIXeuGkblHxjlozZlgD64C34U=
In-reply-to: <201110100829.45823@xxxxxx>
References: <201110071352.20135@xxxxxx> <20111007233450.GK3159@dastard> <201110100829.45823@xxxxxx>
On Mon, Oct 10, 2011 at 2:29 AM, Michael Monnerie
<michael.monnerie@xxxxxxxxxxxxxxxxxxx> wrote:
> On Samstag, 8. Oktober 2011 Dave Chinner wrote:
> > e84661a xfs: add online discard support
> >
> > and
> >
> > a46db60 xfs: add FITRIM support
> I guess that means those patches are not released by now? Sorry, I know
> that these numbers are the patch ID, but don't know what to do with it.

I think online was added in the spring of this year, so around 2.6.38.

I don't know when batch kernel support went in, but I assume some time ago.

> > So both online and background trim methods are available.
> I found the threads in the mailing list. FITRIM v3 Patch was posted
> 7.Jan.2011, but even if it's in default kernel already - how would you
> call it?

fitrim is the batch mode.

To enable realtime discard, add --discard to your mount options.

Documented at 

To invoke batch mode, simply use fstrim from user space.

> > Test well before using them in production, though, as buggy hardware
> > or thinp implementations are quite common....
> I have a NetApp Storage here that is quite capable :-)
> Just having no idea how to activate filesystem discard support :-(

Definitely test.  Particularly for performance.  Many are surprised to
see their performance drop not go up when they start using discard

Many people assume realtime support is better than a batched version.

In most cases I believe users find the opposite to be true.

They can simply have cron call fstrim on a routine basis and all is
good.  ie. Maybe every night right after the backups complete.

Especially when talking about thin provisioning, fstrim has more
flexibility.  You can tell it to only discard free areas that meet
minimum size criteria.  So if your thin provisioning is 1MB at a time,
it would be logical to pass 1 MB to fstrim as a minimum discard size.
You can't do that with mount --discard

> --
> mit freundlichen Grüssen,
> Michael Monnerie, Ing. BSc


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