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

azfar

macrumors newbie
Original poster
Nov 20, 2024
3
2
I am looking for an external SSD / 40Gpbs Enclosure primarily to use with macos but after researching a lot I am still confused about the current status of TRIM.

1) If macos (Sequoia) does not support TRIM over USB then how does Samsung (T series) or other brands external SSDs support this since they are only USB NVMe drives and not actual Thunderbolt? correct me if I am wrong.

2) Upon checking many SSD enclosures I noticed that they all (Orico, Sabrent, Startech, Ugreen etc) mention Thundrbolt4 (40Gbps) but in reality they are all only USB NVMe so how TRIM will passthrough with those enclosures?

3) Do I must need to use APFS on external drive to avail Trim with macos?

4) Is TRIM still a must required with Modern SSDs like Crucial P3, BX500 etc

5) How fast trim works? if I am deleting large no of files (tens of GBs) and then shutting down mac after few minutes?

6) Any personal experience with any enclosure or external ssd which showing and supporting Trim on mac?

7) Do i need to enable trim by trimforce for external drives?

8) What if manufacturer does provide software for macos?

Looking forward to see some first hand information and experience.
 
1) This is a complicated subject, especially since Apple removed the possibility to easily check the status of TRIM on external drives. My understanding is that TRIM works on true Thunderbolt drives, and it might work on USB drives that support UASP.

3) On an SSD you should definitely use APFS. Not sure whether other filesystems on a Mac support TRIM.

4) TRIM is very useful on all SSDs. The garbage collector in the SSD needs to know which data is garbage that can be "collected". Otherwise it will waste time, energy and write endurance copying the garbage around for wear levelling. TRIM is one of two ways how the drive knows what the garbage is. (The other is when a block is overwritten, then the old version of that block becomes garbage.)

5) I believe it is very fast. It's just a metadata update in the SSD. A few minutes should be more than enough.

7) AFAIK yes.
 
Much as @Basic75 says, but my understanding (no expert):

1) TRIM only works for external Thunderbolt devices. And not for any USB 3.x.

4) Some vendors say host based TRIM is not required - the device does what is needed. I am not convinced either way.

6) System Information says that my Orico Thunderbolt enclosure with Sabrent SSD has TRIM enabled. My Samsung Tx USB do not.

7) I didn't do anything for my Orico/Sabrent. The man page for trimforce says "trimforce enables sending TRIM commands to third-party drives attached to an AHCI controller". AHCI drives are SATA, to I can't see that `trimforce` is relevant for non-SATA drives. TRIM is either automatically enabled (Thunderbolt) or never supported (USB 3.x). I may be wrong?

8) I prefer to avoid manufacturer software.
 
Last edited:
  • Like
Reactions: Mike Boreham
My WD My Passport SSD USB 3.1 gen2 seems to support TRIM (looked at spaceman occurrences in logs) but my Samsung´s T5 and T7 aren’t supported. Obviously, the NVMe WD SN850X in an external Acasis Thunderbolt enclosure supports TRIM.

The WD has an option to set to UASP in the provided software, maybe that’s the reason why it supports TRIM, dunno?

A Samsung SATA SSD in an ASMEDIA based enclosure doesn’t support TRIN neither even if it’s also USB 3.1 gen2. Kind of case to case basis on MacOS.

FWIW, all my external SSD’s and enclosures with SSD’s supports TRIM on Windows…

Oh, yeah, I still believe in TRIM in conjunction with built-in garbage collection to maintain SSD’s performance. I also leave free unallocated space (7 percent) on all my SSD´s (overprovisioning), internals or externals…
 
Last edited:
4) Some vendors say host based TRIM is not required - the device does what is needed. I am not convinced either way.
Unless the SSD understands the partition and filesystem formats it is impossible for the drive to know which data was discarded by the user when not using TRIM. Which means that they don't, the implementation and testing effort would be impossibly high, not to speak of the maintenance and liability nightmare.
8) I prefer to avoid manufacturer software.
Yes! More often than not the only thing they do is make the system unstable or bother you with updates and spam.
 
Last edited:
did you check any actual log showing sending trim to SSD or something like that or System info/SSD software suggesting it?
Ok, here it goes while booted on Ventura internal SSD:

- disk3 is my WD Black SN850X NVMe in an Acasis external Thunderbolt/USB4 enclosure, TRIM is obviously working. Directly connected to a Thunderbolt 3 port.
- disk6 is the APFS container with a Carbon Copy Cloner clone of my internal SSD on Ventura. It resides on my WD My Passport SSD (an NVMe drive inside the enclosure, it's USB 3.1 gen2 with 10 gbps USB-C connector) connected on an Elgato Thunderbolt 3 dock plugged in one of the four Thunderbolts ports of my MacMini late 2018.

Code:
/dev/disk3 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +860.5 GB   disk3
                                 Physical Store disk1s3
   1:                APFS Volume Sequoia - Données       362.2 GB   disk3s1
   2:                APFS Volume Sequoia                 10.7 GB    disk3s2
   3:                APFS Volume Preboot                 2.4 GB     disk3s3
   4:                APFS Volume Recovery                1.3 GB     disk3s4
   5:                APFS Volume VM                      20.5 KB    disk3s5
 
   ----------------------------------------------

/dev/disk6 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +502.0 GB   disk6
                                 Physical Store disk4s3
   1:                APFS Volume MAC2                    9.3 GB     disk6s1
   2:                APFS Volume MAC2 - Données          357.0 GB   disk6s2
   3:                APFS Volume Preboot                 7.9 GB     disk6s3
   4:                APFS Volume Recovery                1.2 GB     disk6s4
   5:                APFS Volume VM                      20.5 KB    disk6s6

-------------------------------------------------------

Hackintosh@Mac-mini ~ % log show --debug --last boot --predicate "processID == 0" | grep trim

2024-11-22 14:36:54.523819-0500 0x10be     Default     0x0                  0      0    kernel: (apfs) spaceman_scan_free_blocks:3374: disk3 scan took 0.034519 s (no trims)
2024-11-22 14:36:54.978364-0500 0x1122     Default     0x0                  0      0    kernel: (apfs) spaceman_scan_free_blocks:3374: disk6 scan took 0.230461 s (no trims)
2024-11-22 14:36:55.261989-0500 0x10be     Default     0x0                  0      0    kernel: (apfs) spaceman_scan_free_blocks:3356: disk3 scan took 0.738158 s, trims took 0.664621 s
2024-11-22 14:36:55.262009-0500 0x10be     Default     0x0                  0      0    kernel: (apfs) spaceman_scan_free_blocks:3366: disk3 118061054 blocks trimmed in 70743 extents (9 us/trim, 106441 trims/s)
2024-11-22 14:36:55.262015-0500 0x10be     Default     0x0                  0      0    kernel: (apfs) spaceman_scan_free_blocks:3369: disk3 trim distribution 1:32372 2+:12161 4+:13788 16+:8154 64+:3216 256+:1052
2024-11-22 14:36:59.922234-0500 0x1122     Default     0x0                  0      0    kernel: (apfs) spaceman_scan_free_blocks:3356: disk6 scan took 4.943860 s, trims took 4.677673 s
2024-11-22 14:36:59.922249-0500 0x1122     Default     0x0                  0      0    kernel: (apfs) spaceman_scan_free_blocks:3366: disk6 30855017 blocks trimmed in 10969 extents (426 us/trim, 2344 trims/s)
2024-11-22 14:36:59.922255-0500 0x1122     Default     0x0                  0      0    kernel: (apfs) spaceman_scan_free_blocks:3369: disk6 trim distribution 1:8845 2+:1060 4+:732 16+:198 64+:33 256+:101
 
Last edited:
  • Like
Reactions: Basic75
Ok, here it goes while booted on Ventura internal SSD:

- disk3 is my WD Black SN850X NVMe in an Acasis external Thunderbolt/USB4 enclosure, TRIM is obviously working. Directly connected to a Thunderbolt 3 port.
- disk6 is the APFS container with a Carbon Copy Cloner clone of my internal SSD on Ventura. It resides on my WD My Passport SSD (an NVMe drive inside the enclosure, it's USB 3.1 gen2 with 10 gbps USB-C connector) connected on an Elgato Thunderbolt 3 dock plugged in one of the four Thunderbolts ports of my MacMini late 2018.
Correct me if I'm wrong, but my understanding is that spaceman is doing trimming (lower case) at the level of APFS blocks, not TRIMming at the hardware level (i.e. not sending TRIM commands to the external device).

Edit: spaceman does look for free blocks on HDD as well as SSDs.
 
Last edited:
Correct me if I'm wrong, but my understanding is that spaceman is doing trimming (lower case) at the level of APFS blocks, not TRIMming at the hardware level (i.e. not sending TRIM commands to the external device). You will find that spaceman does trimming on APFS HDD.
I don’t know, my knowledge about it is quite limited :(
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.