Bug 852990 - Document/Discuss added TRIM support to XFS
Summary: Document/Discuss added TRIM support to XFS
Alias: None
Deadline: 2012-09-28
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: doc-Performance_Tuning_Guide
Version: 6.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Laura Bailey
QA Contact: ecs-bugs
Depends On: 700324
Blocks: 782183 846498
TreeView+ depends on / blocked
Reported: 2012-08-30 08:04 UTC by Laura Bailey
Modified: 2013-02-26 00:51 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of: 700324
Last Closed: 2013-02-26 00:51:17 UTC
Target Upstream Version:

Attachments (Terms of Use)

Comment 3 Dave Chinner 2012-09-25 02:10:24 UTC
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. 


Comment 5 Dave Chinner 2012-09-25 02:40:52 UTC
(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.:


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


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


Comment 18 Eric Sandeen 2012-10-08 15:50:39 UTC
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-26 00:51:17 UTC
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.