OS X Yosemite has been updated to version 10.10.4 and with it Apple has surfaced a trim command in Terminal. Trim enables more efficient "garbage collection" on Macs equipped with some third-party solid state drives (SSDs). Not all SSDs are created equal, though, and that raises some issues to consider before you pull the trim trigger.
Let me point out right off the top that if you're using a Mac with built-in SSD storage, none of this applies to you. Trim support in 10.10.4 is only relevant to Macs with upgraded third-party SSD. And even then, trim may only be relevant to a subset of those Macs.
"Trimming" is a technique used by operating systems to do "garbage collection" on an solid state disk. Trimming enables the SSD to consolidate blocks of flash memory to make sure performance remains high. Without garbage collection, an SSD can slow down over time as more data is written to the drive.
If you bought your Mac with an SSD factory-installed by Apple, you don't have to worry. First party SSDs do their own garbage collection, so no changes are necessary for those systems. Third-party SSDs equipped with SandForce controllers, like the ones sold by Other World Computing (OWC), don't need any help, either (opens in new tab).
With Mavericks and previous OS X releases, some Mac users who had upgraded their computers with third-party SSDs used Trim Enabler and other tools to get trim support to work on their drives. That went away with the release of Yosemite, which enforced a new security measure called "kext signing." Kernel extensions, or kexts, are system drivers. Kext signing makes sure system drivers stay unaltered to prevent potential security problems. Unfortunately, this meant that utilities which altered the way SSD drivers work stopped working on Yosemite.
While kext signing is still Yosemite's law of the land, 10.10.4 introduces a new "trimforce" command that enables trim on SSDs. OS X 10.10.4's new "trimforce" command is entered through the Terminal:
sudo trimforce enable
The operating system barks back a long and potentially scary message about how using trimforce may cause "unintended data loss or data corruption" before turning it on.
The problem is that not all SSDs implement trim support the same way, and some models from some manufacturers appear to have very buggy trim implementations all together.
So why did Apple enable this? Well, it looks like this is an early implementation of something we expected in El Capitan, but many newer third-party SSDs don't have any trouble with trim support and will benefit from it, so it's a net positive.
Again, if you're using a Mac equipped with a factory-installed SSD or one that uses an SSD that has a SandForce controller, this doesn't apply. If you're using a third-party SSD, use this command at your own risk. I'd strongly recommend checking with user support forums and any other online resources for your SSD maker before enabling trimforce on your Mac, and whatever you do, back up early and often.
Thanks for this, Peter - this is definitely needed. There's nothing like slowly watching your speedy SSD's performance slow to a crawl over the course of a couple months.
Anyone know if this actually triggers the TRIM command to be sent right after this is enabled?
First research if the TRIM-bug affects your SSD. If it does, you may lose data:
To add to the fun, the source for the Linux ATA driver identifies some SSDs that don't handle certain forms of TRIM very well: https://github.com/torvalds/linux/blob/e64f638483a21105c7ce330d543fa1f1c...
Thanks for posting this. Reading through the definition it looks like my Samsung 8xxx and crucial SSDs are no go. Bummer.
This is only for Linux OS if you read the article. And not Sequential Trim which Apple uses.
Thank you for signing up to iMore. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.