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

krishnaM

macrumors regular
Original poster
Sep 26, 2014
210
12
Just purchased M1 mini with 256GB hard drive and planning to use my 1Tb Samsung pcie ssd in external enclosure (usb 3.1 Gen 2, 10Gbps) for data. Still reading the forum to learn about M1 macs. I couldn't find any info about trim support in M1 macs. Do I need to enable trim on external SSD in M1 mini? I am presuming trim is enabled by default on internal drive and I don't need to do anything.
 

Slartibart

macrumors 68030
Aug 19, 2020
2,913
2,628
Well, connect the external SSD, open System Information (click the Apple menu while holding down the Option key on your keyboard), select the SSD in the USB or Thunderbolt device (depends on your external enclosure) tree. Look for „Trim Support“ in the info sheet.

You can turn trim support on or off using e.g. Trim Enabler (the free version is sufficient for that).

EDIT: to clarify the above: Trim is supported on internal and external Thunderbolt-connected SSDs; I thought at least Samsung T7 is too, but will check. T5 via USB-C is not trim-enabled.
 
Last edited:

Mike Boreham

macrumors 68040
Aug 10, 2006
3,793
1,812
UK
I don't believe macOS sends the TRIM command to any USB connected device. Thunderbolt devices yes.

My TB3 external drives show TRIM supported but not the USB ones.

I am not convinced it matters as much nowadays as in the early days because the manufacturers Garbage Collection does then job instead.
 

Mike Boreham

macrumors 68040
Aug 10, 2006
3,793
1,812
UK
Well, connect the external SSD, open System Information (click the Apple menu while holding down the Option key on your keyboard), select the SSD in the USB or Thunderbolt device (depends on your external enclosure) tree. Look for „Trim Support“ in the info sheet.

You can turn trim support on or off using e.g. Trim Enabler (the free version is sufficient for that).
A lot of conflicting advice and info on the subject!

I haven't used any of the hacks and my internal and two TB3 external SSDs are shown as TRIM supported, and my USB Samsung T5 and T7 SSDs are not. I may do some testing on a T5.

The Eclectic Light site is one I trust more than most and this article seems to about sum up the state of play, though that article is a couple of years old now so something may have changed.
 
Last edited:

Fishrrman

macrumors Penryn
Feb 20, 2009
28,525
12,652
I don't believe that TRIM works over any USB connection to the Mac.

This may be a limitation of the Mac's design (I do not know if TRIM can be enabled with USB devices on Windows).

I wouldn't expect TRIM to work with Macs at any time in the near future.

BUT HAVING SAID THAT:
Don't worry about it.
Just connect and use the drive.
It will work.
 

Significant1

macrumors 68000
Dec 20, 2014
1,622
754
I don't believe that TRIM works over any USB connection to the Mac.

This may be a limitation of the Mac's design (I do not know if TRIM can be enabled with USB devices on Windows).

I wouldn't expect TRIM to work with Macs at any time in the near future.

BUT HAVING SAID THAT:
Don't worry about it.
Just connect and use the drive.
It will work.
I believe that trim over usb only works by making a scsi tunnel, so it is in reality it is the scsi protocol that supports it. But not sure that MacOS supports that. At least I cannot see anything in system report, when connecting my 2TB WD My Passport. I plan on using that drive for nas on an older Mac, so would like to know that it doesn't wear down premature even though there is 5 years warrenty on it.
 

CMMChris

macrumors 6502a
Oct 28, 2019
850
793
Germany (Bavaria)
It's correct what some already said in here. There is no TRIM support for USB drives on macOS (also the controller of the enclosure would need to support it). But with APFS you don't really need TRIM anymore. I am using a 2.5" SSD inside a USB enclosure for video editing and never faced any bottlenecks by missing TRIM.

If you want to use TRIM tho, go and get some Thunderbolt based SSD. This will, depending on the SSD model, support TRIM either OOB or by running trimforce enable in Terminal. Bear in mind however, that macOS runs garbage collection on startup. So for TRIM to take effect on external drives, they need to be connected at boot time.
 

Mike Boreham

macrumors 68040
Aug 10, 2006
3,793
1,812
UK
It's correct what some already said in here. There is no TRIM support for USB drives on macOS (also the controller of the enclosure would need to support it). But with APFS you don't really need TRIM anymore. I am using a 2.5" SSD inside a USB enclosure for video editing and never faced any bottlenecks by missing TRIM.

If you want to use TRIM tho, go and get some Thunderbolt based SSD. This will, depending on the SSD model, support TRIM either OOB or by running trimforce enable in Terminal. Bear in mind however, that macOS runs garbage collection on startup. So for TRIM to take effect on external drives, they need to be connected at boot time.

What you say is supported by the caution on the iFixit page about using the Trimforce command:

"⚠️ Warning with an APFS SSD, enabling Trim is not recommended".

So why does Apple use TRIM by default on internal APFS and TB drives?
 

Mike Boreham

macrumors 68040
Aug 10, 2006
3,793
1,812
UK
That's BS
iFixit don't have a reputation for BS. I assumed their recommendation was at least partly because of what you said....that TRIM not necessary for APFS.

Any idea about my other question?...why Apple continue to use TRIM with APFS on internals and TB.
 

CMMChris

macrumors 6502a
Oct 28, 2019
850
793
Germany (Bavaria)
Well, what iFixit writes is BS because Apple does use TRIM by default on their machines. Why should they do that if it is "not recommended"?
TRIM still has its purpose. Just because APFS does utilize its own garbage collection doesn't mean TRIM is useless. There is nothing wrong with using TRIM when it's available. It just isn't absolutely necessary anymore. Back with HFS some SSDs got really slow without TRIM. With APFS that doesn't happen anymore or at least the impact isn't as big anymore.
 

mr_roboto

macrumors 6502a
Sep 30, 2020
777
1,668
It's correct what some already said in here. There is no TRIM support for USB drives on macOS (also the controller of the enclosure would need to support it). But with APFS you don't really need TRIM anymore. I am using a 2.5" SSD inside a USB enclosure for video editing and never faced any bottlenecks by missing TRIM.
Why do you think APFS doesn't need TRIM? Your later posts indicate you think APFS does its own garbage collection, but it does not. SSD garbage collection is a function performed by the SSD's controller, not a filesystem driver like APFS.

Video editing is one of the best cases for running a SSD without TRIM. The closer your access pattern is to small random writes, the more you need TRIM. Video editing tends towards long linear writes, which is much friendlier to SSDs operating without TRIM.

If you want to use TRIM tho, go and get some Thunderbolt based SSD. This will, depending on the SSD model, support TRIM either OOB or by running trimforce enable in Terminal. Bear in mind however, that macOS runs garbage collection on startup. So for TRIM to take effect on external drives, they need to be connected at boot time.
This is the first time I've ever heard anyone claim that macOS only "runs garbage collection" on startup.

The reason I used scarequotes is that what you wrote doesn't make sense, because SATA and NVMe do not even directly recognize the concept of SSD GC. There's no command macOS can issue to tell a drive "do some GC now". Garbage collection is semantically invisible to every layer above the SSD itself. It's a self-initiated maintenance task required in any SSD which both uses NAND flash memory as its storage and presents itself as a block storage device with blocks smaller than the NAND erase block size.

TRIM's relationship to GC is that it reduces how much GC a drive needs to run, and makes it more likely that the drive can mostly run GC during idle periods. Without TRIM, it's far more likely for the drive to need to pause user I/O requests while it does some GC.

Perhaps you think macOS only issues TRIM commands during startup? If so, why? There are some combinations of operating system and filesystem where TRIM is not used on the fly to mark deleted data as deleted, but as far as I know macOS and HFS/APFS aren't one of them.
 

mr_roboto

macrumors 6502a
Sep 30, 2020
777
1,668
iFixit don't have a reputation for BS. I assumed their recommendation was at least partly because of what you said....that TRIM not necessary for APFS.
Much like Wikipedia, iFixit crowdsources a lot of their guide material. Unless a guide's author is explicitly identified as an iFixit employee, assume it's some rando from the Internet who may or may not know what they're talking about.

It's reasonable to assume that guides where basically everything is wrong will probably get complaints and get taken down, but something like this? Very easy to imagine how it sticks around even if it's false. (How can you tell?)
 
  • Like
Reactions: Mike Boreham

krishnaM

macrumors regular
Original poster
Sep 26, 2014
210
12
Wow! the thread is very informative and interesting now. Thanks for all the responses. I'll get TB enclosure if I feel the drive is getting slow due to lack of trim. But I am guessing I'll be ok for now. Thanks
 
  • Like
Reactions: CMMChris

white7561

macrumors 6502a
Jun 28, 2016
934
385
World
If you really want to restore your USB 3 only External SSD . Just copy all the data to somewhere. And use a virtual machine to run Linux and do blkdiscard (as long as the enclosure supports trim) it'll wipe the whole drive but Will restore the performance since it's sending a trim command to the whole drive..


Good alternative for once in a while if it gets that bad

Atleast that works fine on Intel. Haven't tried it on M1 tho.
 
  • Like
Reactions: Significant1

Mike Boreham

macrumors 68040
Aug 10, 2006
3,793
1,812
UK
I don't believe macOS sends the TRIM command to any USB connected device. Thunderbolt devices yes.

My TB3 external drives show TRIM supported but not the USB ones.

I am not convinced it matters as much nowadays as in the early days because the manufacturers Garbage Collection does then job instead.
My most important external USB SSD is a 4TB Crucial X6. This is what Crucial say about TRIM:

"Conclusion
Trim and Active Garbage Collection are useful tools that can benefit the speed, function, and longevity of your SSD. But if your operating system doesn't support Trim, it's not a disaster. All Crucial SSDs are designed and tested assuming that they will be used without Trim".


I also have Samsung T5 and T7 and the only statement I can see from Samsung is in their FAQ, where they say:

"TRIM is a facility by which the OS can notify the SSD when data is either marked for erase or no longer valid.
TRIM helps to make Garbage Collection more efficient by preparing invalid data for deletion. When the OS “deletes” data, the data does not actually go anywhere.
The space in which it resides is simply marked as “free space” that may be used later.
By default, the OS doesn't let the SSD know which data is now free.
TRIM allows the OS to inform the SSD which data is no longer valid, allowing the SSD to skip over invalid data when performing Garbage Collection".


Not as clear cut as the Crucial statement but the bold sentences imply Active Garbage Collection is the main tool doing the job.
 
Last edited:
  • Like
Reactions: Basic75

Significant1

macrumors 68000
Dec 20, 2014
1,622
754
My most important external USB SSD is a 4TB Crucial X6. This is what Crucial say about TRIM:

"Conclusion
Trim and Active Garbage Collection are useful tools that can benefit the speed, function, and longevity of your SSD. But if your operating system doesn't support Trim, it's not a disaster. All Crucial SSDs are designed and tested assuming that they will be used without Trim".


I also have Samsung T5 and T7 and the only statement I can see from Samsung is in their FAQ, where they say:

"TRIM is a facility by which the OS can notify the SSD when data is either marked for erase or no longer valid.
TRIM helps to make Garbage Collection more efficient by preparing invalid data for deletion. When the OS “deletes” data, the data does not actually go anywhere.
The space in which it resides is simply marked as “free space” that may be used later.
By default, the OS doesn't let the SSD know which data is now free.
TRIM allows the OS to inform the SSD which data is no longer valid, allowing the SSD to skip over invalid data when performing Garbage Collection".


Not as clear cut as the Crucial statement but the bold sentence implies Active Garbage Collection is sufficient.
Crucial statement was from a time, where Apple only supported trim on Apple ssd. Of course they still wanted to sell drives to Mac users at that time, so they had to downplay the importance of missing trim support.

I am not convinced it matters as much nowadays as in the early days because the manufacturers Garbage Collection does then job instead.

Trim is not an alternative to the Manufacturers Garbage Collection. It is a command that help the Manufacturers Garbage Collection work more efficient.
 
  • Like
Reactions: Basic75

Mike Boreham

macrumors 68040
Aug 10, 2006
3,793
1,812
UK
Crucial statement was from a time, where Apple only supported trim on Apple ssd. Of course they still wanted to sell drives to Mac users at that time, so they had to downplay the importance of missing trim support.
There isn't a date on that quote, (except 2021 at the very bottom), and Apple still don't support TRIM on USB SSDs (at least not on my Samsung T5, T7 and Crucial X6) so I think the Crucial statement is still valid.

Trim is not an alternative to the Manufacturers Garbage Collection. It is a command that help the Manufacturers Garbage Collection work more efficient.
Yes, the two quotes from Crucial and Samsung make this very clear. Active Garbage Collection is what matters and TRIM helps it.

Incidentally I just had a look at Trim Enabler and found in the forum a statement by Lead Developer Oskar that it will only work on external USB SSDs if System Report shows "Trim Support: No". But if there is no mention of Trim Support it can't. None of my Samsung T5, T7, Crucial X6 or a couple of 2.5" SSDs show "Trim Support: No" in System Report, so I suspect the usefulness of Trim Enabler for external USB SSDs is limited.
 

Basic75

macrumors 68000
May 17, 2011
1,996
2,342
Europe
I am not convinced it matters as much nowadays as in the early days because the manufacturers Garbage Collection does then job instead.
Instead? Do you know how GC and TRIM work? TRIM is how the OS tells the SSD what is garbage! Garbage collection works much better with TRIM.
 

Basic75

macrumors 68000
May 17, 2011
1,996
2,342
Europe
There isn't a date on that quote, (except 2021 at the very bottom), and Apple still don't support TRIM on USB SSDs (at least not on my Samsung T5, T7 and Crucial X6) so I think the Crucial statement is still valid.


Yes, the two quotes from Crucial and Samsung make this very clear. Active Garbage Collection is what matters and TRIM helps it.

Incidentally I just had a look at Trim Enabler and found in the forum a statement by Lead Developer Oskar that it will only work on external USB SSDs if System Report shows "Trim Support: No". But if there is no mention of Trim Support it can't. None of my Samsung T5, T7, Crucial X6 or a couple of 2.5" SSDs show "Trim Support: No" in System Report, so I suspect the usefulness of Trim Enabler for external USB SSDs is limited.
It's really a shame that Apple doesn't implement this. Windows can do it, Linux can, too, and Apple can do it over PCIe, so it should be easy for them to add.
 

Mike Boreham

macrumors 68040
Aug 10, 2006
3,793
1,812
UK
Instead? Do you know how GC and TRIM work? TRIM is how the OS tells the SSD what is garbage! Garbage collection works much better with TRIM.
Yes (as I said in #19) I shouldn't have said "instead" but my point is the same. I am not convinced TRIM is as important on modern SSDs because GC can do it without TRIM. If TRIM was essential Mac forums would be full of reports of slow SSDs.
 
Last edited:

macphoto861

macrumors 6502
May 20, 2021
489
408
Interesting discussion over here…

 
  • Like
Reactions: CMMChris

Basic75

macrumors 68000
May 17, 2011
1,996
2,342
Europe
I am not convinced TRIM is as important on modern SSDs because GC can do it without TRIM. If TRIM was essential Mac forums would be full of reports of slow SSDs.
GC without TRIM can do half of "it", it can collect overwritten garbage but it can not collect unused sectors because it doesn't know which sectors are newly unused.

Letting the GC shuffle around unused data means that you are wasting time, energy and write cycles (of which modern SSDs don't have many).

It's fine if you choose to not care, some people do.
 

Mike Boreham

macrumors 68040
Aug 10, 2006
3,793
1,812
UK
GC without TRIM can do half of "it", it can collect overwritten garbage but it can not collect unused sectors because it doesn't know which sectors are newly unused.

Letting the GC shuffle around unused data means that you are wasting time, energy and write cycles (of which modern SSDs don't have many).

It's fine if you choose to not care, some people do.

The manufacturer's don't seem very concerned as above.

What can any Mac user do if they do care?

The Spaceman thing in the other thread may be useful but does not seem an easily applicable tool at this point.

Otherwise stick to Thunderbolt connected SSDs.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.