On Mon, Oct 10, 2011 at 2:29 AM, Michael Monnerie
> 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.
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