Re: TRIM on XFS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 http://lxr.linux.no/#linux+v3.0.4/Documentation/filesystems/xfs.txt

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
heavily.

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

HTH
Greg

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



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux