Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

camner

macrumors regular
Original poster
Jun 19, 2009
228
15
I was under the (mis?)impression that under Mojave, TRIM was supported for external SSDs connected via Thunderbolt.

I have a 2015 27" iMac running 10.14.3, with a Thunderbolt 2 enclosure with a Samsung 850 EVO SSD. System report says that TRIM is NOT supported.

Is there something I need to do to turn on TRIM on the external SSD?
 

DeltaMac

macrumors G5
Jul 30, 2003
13,744
4,571
Delaware
Yes.
Trim on a Thunderbolt drive (non-Apple SSD) will show not supported, until you enable trim in the system.
Run this command in your terminal:
Code:
sudo trimforce enable
The command will give you a warning message, and ask for your admin password.
Enter your password, and press enter. I think it will also ask if you are sure about doing that, and I think you just press Y a time or two. Your system will reboot, and trim should be enabled on any interface that supports it (and the System Information report will tell you that TRIM is supported.
Again, any Apple-brand SSDs are supported without needing that trimforce command. Any other brands need trim enabled in the system. The trimforce command does that. (There's a couple of exceptions to that. A few SSDs have firmware that is engineered to be accepted by the Apple system. You would know if you have those, as they are sold with that intent.)
 

BLUEDOG314

macrumors 6502
Dec 12, 2015
379
120
Another thing worth noting is that it MAY take an abnormally long time for your system to restart when it says it is going to. I know this is still very anecdotal, but I did basically the same thing you are going to do on three similar drive setups and the restart took upwards of two minutes to complete.
 

camner

macrumors regular
Original poster
Jun 19, 2009
228
15
Another thing worth noting is that it MAY take an abnormally long time for your system to restart when it says it is going to. I know this is still very anecdotal, but I did basically the same thing you are going to do on three similar drive setups and the restart took upwards of two minutes to complete.

Are you saying the restart just after enabling TRIM took 2 minutes, or that after enabling TRIM ALL restarts took 2 min?
 

DeltaMac

macrumors G5
Jul 30, 2003
13,744
4,571
Delaware
The reboot after trim enable takes extra time, but only on that next restart. It doesn't affect boots after that in any noticeable way.
 
  • Like
Reactions: J.Gallardo

camner

macrumors regular
Original poster
Jun 19, 2009
228
15
Thanks very much to all who replied.

Do you know if there is a difference between using the "trimforce" command vs a third-party method such as TrimEnabler and Disk Sensei?

Also, since the SSD has been written to without TRIM for a while, is there a benefit to enabling TRIM, erasing the SSD, and copying the data back from a backup (that would start the drive off fresh with TRIM enabled)?

Thanks again!
 

DeltaMac

macrumors G5
Jul 30, 2003
13,744
4,571
Delaware
If you enable trim, it makes no difference how you get to that result. (The trimforce command always works)
Running a third-party app does not give you some "better" version of trim - trim is trim :cool:

When trim runs, it is drive-wide, and complete up to that point. There would be absolutely no point to erasing the drive. You won't get a "better" trim by doing that. And, it would be counter-productive, as you would be writing back to the drive, when you don't need to, unnecessarily writing to the drive, and moving closer to the end-of-life for your drive.
Finally, TRIM operates on the data already written to the SSD, finding and marking obsolete or invalid data, telling the SSDs drive controller to ignore that data. It speeds up the "garbage collection" process, (which the SSD does, even if TRIM is not enabled). Thus, TRIM is a process that complements garbage collection.
 
  • Like
Reactions: J.Gallardo

camner

macrumors regular
Original poster
Jun 19, 2009
228
15
@DeltaMac:

I really appreciate the time you took to explain this to me so clearly through multiple replies. Off to Terminal I go!
 

sldsnk

macrumors member
Jun 22, 2005
42
25
Yes.
Trim on a Thunderbolt drive (non-Apple SSD) will show not supported, until you enable trim in the system.
Run this command in your terminal:
Code:
sudo trimforce enable
The command will give you a warning message, and ask for your admin password.
Enter your password, and press enter. I think it will also ask if you are sure about doing that, and I think you just press Y a time or two. Your system will reboot, and trim should be enabled on any interface that supports it (and the System Information report will tell you that TRIM is supported.
Again, any Apple-brand SSDs are supported without needing that trimforce command. Any other brands need trim enabled in the system. The trimforce command does that. (There's a couple of exceptions to that. A few SSDs have firmware that is engineered to be accepted by the Apple system. You would know if you have those, as they are sold with that intent.)


My 2012 Mac Mini was running really slow (5mb/s read speed) using a Lacie Rugged 128gb thunderbolt SSD. I enabled TRIM using the code you mentioned, rebooted and it's much snappier. I ran a speed test and it's reading at 365mb/s.

Thanks a million!
 

MarckyG

macrumors member
Jan 15, 2014
84
44
Germany
I know this is over a year old, but...
How does TRIM work out for you all? Everything fine and no problems so far with the SSDs?
I feel weird enabling that in the terminal, especially since on my old Mac running Sierra TRIM was enabled from the start.
I deliberately bought an external Thunderbolt enclosure so my SSD is being cared for.
I plug it in the Sierra Mac: TRIM enabled.
I plug it in the Catalina Mac: TRIM disabled...
Why though?
 

DeltaMac

macrumors G5
Jul 30, 2003
13,744
4,571
Delaware
Have you enabled trim, using the forcetrim command, on your Catalina Mac?
That should be all you need. (Forcetrim enables trim for the system, not just one device. You can enable it on each system where you might use that external drive. You also end up with a Mac system that will trim other devices as you use them, because, well, trim is enabled on the system (assuming those devices are supported. Very few USB enclosures support trim, for example.
 
  • Like
Reactions: loby

MarckyG

macrumors member
Jan 15, 2014
84
44
Germany
Have you enabled trim, using the forcetrim command, on your Catalina Mac?
That should be all you need. (Forcetrim enables trim for the system, not just one device. You can enable it on each system where you might use that external drive. You also end up with a Mac system that will trim other devices as you use them, because, well, trim is enabled on the system (assuming those devices are supported. Very few USB enclosures support trim, for example.

Thanks! I knew about forcetrim, somehow I thought on the old Mac it was enabled by default... Then I started doubting me. MAYBE I used forcetrim a long long time ago and forgot? Well using the forcetrim command on the new Catalina Mac did the trick!
 
  • Like
Reactions: DeltaMac

4sallypat

macrumors 601
Sep 16, 2016
4,031
3,779
So Calif
Strange, I can't get the sudo command to work on a Catalina iMac....
IMG_6123.jpg
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.