TRIM is a service that runs in your operating system and works with SSD hardware to track what blocks on the drive are unused, and then prepares them for writing. When put in use, TRIM can optimize SSD performance, especially on drives that are relatively full or used for storing and deleting large amounts of data. Until now TRIM support in OS X was reserved for Apple-supplied hard drives, but with the release of OS X 10.10.4, Apple has included a tool that allows for TRIM on third-party SSD devices.
To enable TRIM on any SSD that you have in your Mac, first ensure you have a full and restorable backup of your Mac. You can do this using Time Machine, or a variety of third-party cloning and dedicated backup utilities for OS X. Then be sure you have OS X 10.10.4 or later installed, and then open the Terminal and run the following command:
sudo trimforce enable
Per Apple’s warning when you attempt to use this tool, keep in mind that because TRIM relies on OS X to help track drive usage, Apple cannot be sure all devices have been properly tested, so Apple offers this tool “as-is” with no guarantee.
While rare, data corruption and unexpected behavior could potentially occur when using TRIM, therefore unless you feel you need it, you might consider doing without enabling TRIM. For the most part, unless you are doing tasks that push the performance envelope of your drive and Mac, you will likely not see a significant increase in performance when using TRIM. In fact, some devices may poorly interact with TRIM on OS X and show notable decreases in performance, so your mileage may vary.
If you are using a third-party SSD and have not yet upgraded to OS X 10.10.4, then you can use several third-party tools like TrimEnabler to activate TRIM on older systems; however, again keep in mind the results may not always be positive.
If you find that TRIM is not giving you the results you were expecting, then you can disable it by running the same command with “disable” instead of “enable” as shown above:
sudo trimforce disable
UPDATE: Added information on how to disable TRIM
Having an Apple internal SSD drive, is TRIM active under Snow Leopard (which came with the computer and that drive)?
Yes, TRIM is enabled for all Apple SSDs.
Expanding a little on Tomislav’s reply: yes, the last revision of Snow Leopard, 10.6.8, enabled TRIM for (almost) all Apple-issued SSDs. See this.
Thank you. Terminal says it was successful, but is there any way to verify that? In the evnt that I want to disable it for some reasons, can I? How?
Go to System Profiler/System Information to check if TRIM is enabled.
To be more specific, it’s found in the SATA/SATA Express tab…
Just about time for Apple to support TRIM on third-party SSD.
NB: you must be logged in as admin.
Kind of. If a non-admin user is logged in, there is no need to log him off or use Fast User Switching. Just type this command to become an administrator-enabled user with username thisisanadmin:
You will be prompted for the password of thisisanadmin, and then you can enter the sudo trimforce enable command.
Apple has released OSX 10.10.4 update, which (for Yosemite users), adds TRIM support for third-party SSDs.
Just enabled for the Samsung SSD 850 EVO 1TB on my 2012 Mac Mini and everything runs fine.
Just wanted to say thanks to Topher for this – another very useful tip. I enabled trim on a late 2012 Mac Mini with a Crucial SSD and it works fine. If you do this, keep in mind that the reboot takes an exceptionally long time (maybe 3 extra minutes beyond the normal 20 seconds). But this is very much worthwhile.
If you’ve already enabled TRIM using Chameleon SSD Optimizer will doing this be a conflict?
Related issue, maybe, and looking for comments:
I just installed a (new) Samsung 850 EVO SSD on a 2009 MacBook Pro; clean install of 10.10.4. The computer is (randomly) freezing during boot and / or after successful boot when using the computer “normally” — i.e., just doing routine mail / browsing tasks. When it freezes during boot, it requires hard reboot. When it freezes during “normal” use, it will sometimes “recover” but sometimes also requires hard reboot.
Any thoughts would be appreciated. And no — I have not enabled Trim.
Just a thought: looking on Amazon there are a variety of models of the 850 EVO SSD. Other than capacity, the biggest difference seems to be the SATA bus on the drive. The newest and highest capacity models are SATA III. It could be that, if you got one of those, it is incompatible with your 6 year old MacBook Pro. The problem might also be that your MBP only marginally supports OS X 10.10.4. Did you have Yosemite on the hard drive you replaced?
Check out this link for some 850 EVO problems: http://www.bing.com/search?q=Samsung+SSD+850+EVO+Problems&FORM=R5FD2.
PS: There’s an in-depth review of the 850 EVO and 850 EVO Pro at: http://www.pcper.com/reviews/Storage/Samsung-850-EVO-and-Pro-2TB-SATA-SSD-Review-Multi-terabyte-Consumer-SSDs-Are-Here.
Note that DD had success with the EVO 850 1TB, but his Mac Mini is three years newer than your Mac Pro.
Update: After almost 2 weeks, everything is still running fine with TRIM enabled. No freezing problems like Grey is having. My Mac Mini is a late 2012 running 10.10.4 with 16GB RAM. My Samsung SSD 850 EVO 1TB was installed 3 months ago. I very seldom shut the Mini down. I usually just put it to sleep when I’m not using it.
This machine does fine with a clone of the (SSD) clean install of 10.10.4 on a conventional hard drive. (Not all “features” are supported — like Handoff et al — but OS performance is as good as with any predecessor, maybe better). This rules out my particular installation of the OS (and the version) as the problem. Could be that I just have a defective SSD; I’ve ordered a replacement.