* TRIM on XFS
@ 2011-10-07 11:52 Michael Monnerie
2011-10-07 23:34 ` Dave Chinner
0 siblings, 1 reply; 9+ messages in thread
From: Michael Monnerie @ 2011-10-07 11:52 UTC (permalink / raw)
To: xfs
[-- Attachment #1.1: Type: text/plain, Size: 644 bytes --]
It's been a long time since I've been reading about TRIM. What is the
current state for XFS? I believe there's TRIM support, but only offline.
Can someone explain how to activate that and actually run a TRIM?
And there was some talk of "inline TRIM", i.e. always TRIMing on delete.
Is that implemented already?
We're on VMware with thin provisioned machines, and that would hugely
benefit from TRIM.
--
mit freundlichen Grüssen,
Michael Monnerie, Ing. BSc
it-management Internet Services: Protéger
http://proteger.at [gesprochen: Prot-e-schee]
Tel: +43 660 / 415 6531
// Haus zu verkaufen: http://zmi.at/langegg/
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: TRIM on XFS
2011-10-07 11:52 TRIM on XFS Michael Monnerie
@ 2011-10-07 23:34 ` Dave Chinner
2011-10-10 6:29 ` Michael Monnerie
0 siblings, 1 reply; 9+ messages in thread
From: Dave Chinner @ 2011-10-07 23:34 UTC (permalink / raw)
To: Michael Monnerie; +Cc: xfs
On Fri, Oct 07, 2011 at 01:52:19PM +0200, Michael Monnerie wrote:
> It's been a long time since I've been reading about TRIM. What is the
> current state for XFS? I believe there's TRIM support, but only offline.
> Can someone explain how to activate that and actually run a TRIM?
>
> And there was some talk of "inline TRIM", i.e. always TRIMing on delete.
> Is that implemented already?
>
> We're on VMware with thin provisioned machines, and that would hugely
> benefit from TRIM.
>
e84661a xfs: add online discard support
and
a46db60 xfs: add FITRIM support
So both online and background trim methods are available. Test well
before using them in production, though, as buggy hardware or thinp
implementations are quite common....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: TRIM on XFS
2011-10-07 23:34 ` Dave Chinner
@ 2011-10-10 6:29 ` Michael Monnerie
2011-10-10 20:28 ` Greg Freemyer
0 siblings, 1 reply; 9+ messages in thread
From: Michael Monnerie @ 2011-10-10 6:29 UTC (permalink / raw)
To: xfs
[-- Attachment #1.1: Type: Text/Plain, Size: 987 bytes --]
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.
> 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?
> 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 :-(
--
mit freundlichen Grüssen,
Michael Monnerie, Ing. BSc
it-management Internet Services: Protéger
http://proteger.at [gesprochen: Prot-e-schee]
Tel: +43 660 / 415 6531
// Haus zu verkaufen: http://zmi.at/langegg/
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: TRIM on XFS
2011-10-10 6:29 ` Michael Monnerie
@ 2011-10-10 20:28 ` Greg Freemyer
2011-10-10 22:04 ` Jeffrey Hundstad
0 siblings, 1 reply; 9+ messages in thread
From: Greg Freemyer @ 2011-10-10 20:28 UTC (permalink / raw)
To: Michael Monnerie; +Cc: xfs
On Mon, Oct 10, 2011 at 2:29 AM, Michael Monnerie
<michael.monnerie@is.it-management.at> 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@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: TRIM on XFS
2011-10-10 20:28 ` Greg Freemyer
@ 2011-10-10 22:04 ` Jeffrey Hundstad
2011-10-10 23:52 ` Greg Freemyer
2011-10-11 2:05 ` Dave Chinner
0 siblings, 2 replies; 9+ messages in thread
From: Jeffrey Hundstad @ 2011-10-10 22:04 UTC (permalink / raw)
To: xfs
On 10/10/2011 03:28 PM, Greg Freemyer wrote:
> fitrim is the batch mode.
>
> To enable realtime discard, add --discard to your mount options.
>
> Documented athttp://lxr.linux.no/#linux+v3.0.4/Documentation/filesystems/xfs.txt
>
> To invoke batch mode, simply use fstrim from user space.
Hello,
I'm also trying to use FITRIM on a simple XFS partition on a spinning
magnetic hard drive (remember those). I haven't had much luck. I'm
doing this just to get used to the commands when using this against a
thinly provisioned disk. I have no idea if this should work in this
configuration.
On a Debian system with Linux 3.0.0-2-amd64 when I issue:
# fstrim /
I receive:
fstrim: /: FITRIM ioctl failed: Operation not supported
With an strace this looks like:
open("/", O_RDONLY) = 3
ioctl(3, 0xc0185879, 0x7fff4ea851b0) = -1 EOPNOTSUPP (Operation not
supported)
My fstrim is from util-linux-2.19.1-5
I'd be happy to try to diagnose this further if people are interested.
Any suggestions where I should start would be much appreciated.
--
Jeffrey Hundstad
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: TRIM on XFS
2011-10-10 22:04 ` Jeffrey Hundstad
@ 2011-10-10 23:52 ` Greg Freemyer
2011-10-11 2:05 ` Dave Chinner
1 sibling, 0 replies; 9+ messages in thread
From: Greg Freemyer @ 2011-10-10 23:52 UTC (permalink / raw)
To: Jeffrey Hundstad; +Cc: xfs
On Mon, Oct 10, 2011 at 6:04 PM, Jeffrey Hundstad
<jeffrey.hundstad@mnsu.edu> wrote:
> On 10/10/2011 03:28 PM, Greg Freemyer wrote:
>>
>> fitrim is the batch mode.
>>
>> To enable realtime discard, add --discard to your mount options.
>>
>> Documented
>> athttp://lxr.linux.no/#linux+v3.0.4/Documentation/filesystems/xfs.txt
>>
>> To invoke batch mode, simply use fstrim from user space.
>
> Hello,
>
> I'm also trying to use FITRIM on a simple XFS partition on a spinning
> magnetic hard drive (remember those). I haven't had much luck. I'm doing
> this just to get used to the commands when using this against a thinly
> provisioned disk. I have no idea if this should work in this configuration.
>
> On a Debian system with Linux 3.0.0-2-amd64 when I issue:
> # fstrim /
>
> I receive:
> fstrim: /: FITRIM ioctl failed: Operation not supported
>
> With an strace this looks like:
> open("/", O_RDONLY) = 3
> ioctl(3, 0xc0185879, 0x7fff4ea851b0) = -1 EOPNOTSUPP (Operation not
> supported)
>
> My fstrim is from util-linux-2.19.1-5
>
> I'd be happy to try to diagnose this further if people are interested. Any
> suggestions where I should start would be much appreciated.
>
> --
> Jeffrey Hundstad
I just tried it with a 3.1.0-rc9 kernel and had the same problem.
I just checked xfstests group file and see that test 251 (the fstrim
one) is not in the auto group, so I haven't been running it.
Same is true of btrfs and ext4. I've only been running the auto group
recently. And mostly against btrfs and ext4.
Hopefully someone can explain it to us both.
Greg
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: TRIM on XFS
2011-10-10 22:04 ` Jeffrey Hundstad
2011-10-10 23:52 ` Greg Freemyer
@ 2011-10-11 2:05 ` Dave Chinner
2011-10-11 16:06 ` Jeffrey Hundstad
1 sibling, 1 reply; 9+ messages in thread
From: Dave Chinner @ 2011-10-11 2:05 UTC (permalink / raw)
To: Jeffrey Hundstad; +Cc: xfs
On Mon, Oct 10, 2011 at 05:04:43PM -0500, Jeffrey Hundstad wrote:
> On 10/10/2011 03:28 PM, Greg Freemyer wrote:
> >fitrim is the batch mode.
> >
> >To enable realtime discard, add --discard to your mount options.
> >
> >Documented athttp://lxr.linux.no/#linux+v3.0.4/Documentation/filesystems/xfs.txt
> >
> >To invoke batch mode, simply use fstrim from user space.
>
> Hello,
>
> I'm also trying to use FITRIM on a simple XFS partition on a
> spinning magnetic hard drive (remember those). I haven't had much
> luck. I'm doing this just to get used to the commands when using
> this against a thinly provisioned disk. I have no idea if this
> should work in this configuration.
>
> On a Debian system with Linux 3.0.0-2-amd64 when I issue:
> # fstrim /
>
> I receive:
> fstrim: /: FITRIM ioctl failed: Operation not supported
>
> With an strace this looks like:
> open("/", O_RDONLY) = 3
> ioctl(3, 0xc0185879, 0x7fff4ea851b0) = -1 EOPNOTSUPP (Operation
> not supported)
It means the block device underneath the filesystem doesn't support
the TRIM operation. Check /sys/block/<dev>/queue/discard_max_bytes -
if the value is zero then your device doesn't support discard
operations.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: TRIM on XFS
2011-10-11 2:05 ` Dave Chinner
@ 2011-10-11 16:06 ` Jeffrey Hundstad
2011-10-11 22:25 ` Dave Chinner
0 siblings, 1 reply; 9+ messages in thread
From: Jeffrey Hundstad @ 2011-10-11 16:06 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
Dave,
Thank you. I suspected this may be the case. It is awfully nice to
have a definitive answer though. It is especially nice to have a way to
determine if it is possible. Thank you!
I've created a an XFS Wiki page for this info:
http://xfs.org/index.php/FITRIM/discard
--
Jeffrey Hundstad
On 10/10/2011 09:05 PM, Dave Chinner wrote:
> On Mon, Oct 10, 2011 at 05:04:43PM -0500, Jeffrey Hundstad wrote:
>> On 10/10/2011 03:28 PM, Greg Freemyer wrote:
>>> fitrim is the batch mode.
>>>
>>> To enable realtime discard, add --discard to your mount options.
>>>
>>> Documented athttp://lxr.linux.no/#linux+v3.0.4/Documentation/filesystems/xfs.txt
>>>
>>> To invoke batch mode, simply use fstrim from user space.
>> Hello,
>>
>> I'm also trying to use FITRIM on a simple XFS partition on a
>> spinning magnetic hard drive (remember those). I haven't had much
>> luck. I'm doing this just to get used to the commands when using
>> this against a thinly provisioned disk. I have no idea if this
>> should work in this configuration.
>>
>> On a Debian system with Linux 3.0.0-2-amd64 when I issue:
>> # fstrim /
>>
>> I receive:
>> fstrim: /: FITRIM ioctl failed: Operation not supported
>>
>> With an strace this looks like:
>> open("/", O_RDONLY) = 3
>> ioctl(3, 0xc0185879, 0x7fff4ea851b0) = -1 EOPNOTSUPP (Operation
>> not supported)
> It means the block device underneath the filesystem doesn't support
> the TRIM operation. Check /sys/block/<dev>/queue/discard_max_bytes -
> if the value is zero then your device doesn't support discard
> operations.
>
> Cheers,
>
> Dave.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: TRIM on XFS
2011-10-11 16:06 ` Jeffrey Hundstad
@ 2011-10-11 22:25 ` Dave Chinner
0 siblings, 0 replies; 9+ messages in thread
From: Dave Chinner @ 2011-10-11 22:25 UTC (permalink / raw)
To: Jeffrey Hundstad; +Cc: xfs
On Tue, Oct 11, 2011 at 11:06:24AM -0500, Jeffrey Hundstad wrote:
> Dave,
>
> Thank you. I suspected this may be the case. It is awfully nice to
> have a definitive answer though. It is especially nice to have a
> way to determine if it is possible. Thank you!
>
> I've created a an XFS Wiki page for this info:
> http://xfs.org/index.php/FITRIM/discard
Great!
Looks good - I'll just have to find out which release online discard
first appeared in (different to FITRIM) and add that to the
description of it, but otherwise it looks good. :)
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-10-11 22:25 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-07 11:52 TRIM on XFS Michael Monnerie
2011-10-07 23:34 ` Dave Chinner
2011-10-10 6:29 ` Michael Monnerie
2011-10-10 20:28 ` Greg Freemyer
2011-10-10 22:04 ` Jeffrey Hundstad
2011-10-10 23:52 ` Greg Freemyer
2011-10-11 2:05 ` Dave Chinner
2011-10-11 16:06 ` Jeffrey Hundstad
2011-10-11 22:25 ` Dave Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox