Enabling TRIM on MacOS for third party SSD

There's a command to force trim on third party SSD drives: # trimforce enable

Some people say that can break things or lose data on some SSDs. Some say just "don't enable it".

Any thought on that and any practical examples running ok or not?

Any differences about using on HPFS+ or APFS?


I've been using large Samsung SSD (1 to 4TB ) on macs for +5years, and I see that they get slow over time. So need to format, rewrite the entire volume with 0 to get back performance. Maybe trim would be what I need.

Some thought?

MacBook Pro

Posted on Jan 26, 2021 2:44 PM

Reply
3 replies

Jan 28, 2021 5:45 PM in response to Id7evolutie

I believe the issue is with how the OS handles TRIM support. I'm not certain, but I have seen mentioned that there are queued and non-queued TRIM commands. I'm not certain which version Apple's "trimforce" command uses.


I know that on Linux it is advised not to use the queued TRIM option, but instead manually run the non-queued TRIM command periodically. As @VikingOSX mentions just because an SSD supports TRIM does not mean TRIM works correctly on the SSD. I know Linux actually has a blocklist for certain SSDs and SSD firmwares because the TRIM implementation is known to be broken with specific models & firmware.


You can uncheck "Put hard disk to sleep when possible" in the Energy Saver System Preferences. This will allow the SSD's internal garbage collection & maintenance routines time to run when the SSD is not being actively used. You can also Option Boot the Mac and let the Mac sit on the Apple boot picker menu screen for several hours (or overnight) to achieve the same result. You will notice more issues if the SSD is nearly full since the SSD must work harder to maintain the NAND memory cells.


Jan 26, 2021 4:04 PM in response to Id7evolutie

Trim force does bring back almost all the default speed. I've mostly inserted third party SSD on external thunderbolt enclosures. That way I can remove the external and take it to a MacBook of which I do have trim force enabled and deal with trim then and there. I don't like using trim force on my main Macs. There are characteristics that I don't care for...now a days I'm moving away from SSD to OWC bus powered external thunderbolt enclosure where I can insert any m2 I wish. Trim is supported natively, they are much faster write and read and easy to swap out m2 SSDs.

Jan 26, 2021 3:03 PM in response to Id7evolutie

Many of the more modern SSD/PCIe drive vendors have incorporated TRIM features in their drive controller and in their product small print, may discourage enabling operating system TRIM on the drive. The other thing to consider is that some of these drive controllers detect that the drive is at 50% or greater capacity and invoke a different (read slower) storage algorithm.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Enabling TRIM on MacOS for third party SSD

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.