Bug 852990 - Document/Discuss added TRIM support to XFS
Document/Discuss added TRIM support to XFS
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: doc-Performance_Tuning_Guide (Show other bugs)
6.1
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Laura Bailey
ecs-bugs
: Documentation, FutureFeature
Depends On: 700324
Blocks: 782183 846498
  Show dependency treegraph
 
Reported: 2012-08-30 04:04 EDT by Laura Bailey
Modified: 2013-02-25 19:51 EST (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 700324
Environment:
Last Closed: 2013-02-25 19:51:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 3 Dave Chinner 2012-09-24 22:10:24 EDT
TRIM is not really an XFS specific function. FITRIM is also available for ext4, and both mkfs.ext4 and mkfs.xfs use FITRIM the same way. The fstrim application works identically from a user perspective for both ext4 and XFS.

So if you've already got FITRIM guidelines for ext4, it's likely to be pretty much the same for XFS as well. Do you have guidelines for ext4 already that you can point me at so i can see if they can be reused/made common?

Note: FITRIM != online discard. 

-Dave
Comment 5 Dave Chinner 2012-09-24 22:40:52 EDT
(In reply to comment #3)
> Note: FITRIM != online discard. 

To address online discard, the simple rule of thumb is this: Don't - use FITRIM instead. e.g.:

http://oss.sgi.com/archives/xfs/2011-12/msg00311.html

"The slowness of individual TRIM commands cannot be fixed in XFS -
it' aproperty of the SSD. And no, it's not unique to Sandforce
controllers - there are other types of controllers that have
similiar (or worse) TRIM behaviour. ....

This is one of the reasons why our current recommendation is to not
use online discard, but use background discard (FITRIM) to
periodically issue discards on the free space in the filesystem. It
does not happen in a filesystem performance fast-path, can be
configured with a minimum size to trim, and usually requires much
fewer TRIM commands to be sent to the device so is generally safer."

http://oss.sgi.com/archives/xfs/2012-06/msg00331.html

"So until the block layer is sorted out I can not recommend actually
using -o discard.  I planned to sort out the block layer issues ASAP
when writing that code, but other things have kept me busy every since."

From my perspective, online discard on XFS is a checkbox feature due to the deficiencies of the implementation of discard in the layers below XFS. i.e. it's not something that should really be used in production systems at this point in time...

-Dave
Comment 18 Eric Sandeen 2012-10-08 11:50:39 EDT
Oh and in another case the proposed documentation says:

> *FITRIM operations* are run explicitly by the user with the 'fitrim' command.

but there is no 'fitrim' command, it's 'fstrim' so that needs to be fixed.


I'm going to take another crack at rewriting the above documentation and see what folks think.
Comment 29 Laura Bailey 2013-02-25 19:51:17 EST
Resolved and released alongside Red Hat Enterprise Linux 6.4.

Note You need to log in before you can comment on or make changes to this bug.