Don't forget the Trim!

Macintosh software/hardware discussion and troubleshooting

Moderator: James Steele

Post Reply
User avatar
James Steele
Site Administrator
Posts: 21257
Joined: Fri Oct 15, 2004 10:01 pm
Primary DAW OS: MacOS
Location: San Diego, CA - U.S.A.
Contact:

Don't forget the Trim!

Post by James Steele »

LOL... so my old 250GB SSD in my office MacPro was getting very full and I was getting warnings. So, eureka! I had a 1TB SATA SSD that I had pulled from my Studio Mac Pro when I retired it for the Mac Studio. I popped in a drive bay in my office MacPro (running High Sierra), reformatted it, then used CCC to clone my boot drive to it. It all worked like a champ.

Then I began noticing things getting pretty slow. Web browsing was slow. Even saw a message at bottom of browser window saying waiting on cache, etc. Might have been to write to it, read, don't remember. But something wasn't right. Many things seemed abnormally sluggish.

Aha! I had been using this as a projects drive and not a boot drive previously. And maybe because I reformatted that was the issue, but realized Trim was not enabled. I went to Terminal and used sudo trimforce enable and Bob's my uncle again. Seems like after it rebooted and settled in, things are behaving like the should again. Huzzah!
JamesSteeleProject.com | Facebook | Instagram | Twitter

Mac Studio M1 Max, 64GB/2TB, MacOS 14.5 Public Beta, DP 11.31, MOTU 828es, MOTU 24Ai, MOTU MIDI Express XT, UAD-2 TB3 Satellite OCTO, Console 1 Mk2, Avid S3, NI Komplete Kontrol S88 Mk2, Red Type B, Millennia HV-3C, Warm Audio WA-2A, AudioScape 76F, Dean guitars, Marshall amps, etc., etc.!
User avatar
mikehalloran
Posts: 15242
Joined: Sun Jan 25, 2009 5:08 pm
Primary DAW OS: MacOS
Location: Sillie Con Valley

Re: Don't forget the Trim!

Post by mikehalloran »

Yep. Always possible that Garbage Collection is disabled in the firmware on that old SSD. TRIM is part of the MacOS since 10.6.8 but is blocked for 2.5" SSDs unless you unblock it with that Terminal Command. Apple never built a Mac with a 2.5" SSD.

It works over Thunderbolt, SATA, eSATA and PCIe. It doesn’t work over USB or Ethernet. TRIM is enabled by default on blade type SSDs including the SATA III blade used on some 2012 iMacs.
Last edited by mikehalloran on Sun Sep 10, 2023 8:30 pm, edited 1 time in total.
DP 11.31; 828mkII FW, micro lite, M4, MTP/AV USB Firmware 2.0.1
2023 Mac Studio M2 8TB, 192GB RAM, OS Sonoma 14.4.1, USB4 8TB external, M-Audio AIR 192|14, Mackie ProFxv3 6/10/12; 2012 MBPs Catalina, Mojave
IK-NI-Izotope-PSP-Garritan-Antares, LogicPro X, Finale 27.4, Dorico 5.2, Notion 6, Overture 5, TwistedWave, DSP-Q 5, SmartScore64 Pro, Toast 20 Pro
User avatar
HCMarkus
Posts: 9762
Joined: Tue Jan 10, 2006 9:01 am
Primary DAW OS: MacOS
Location: Rancho Bohemia, California
Contact:

Re: Don't forget the Trim!

Post by HCMarkus »

mikehalloran wrote: Sun Sep 10, 2023 6:50 pmIt doesn’t work over USB or Ethernet..
Good to remember. That’s why I only use USB connected SSDs for “Mostly Read” applications. Or just reformat the drive now and then… I have one I use for daily working project backups (in addition to automatic Time Machine and BackBlaze) that gets wiped whenever I transfer the project files to long term storage.
HC Markus
M1 Mac Studio Ultra • 64GB RAM • 828es • macOS 13.6.4 • DP 11.31
User avatar
James Steele
Site Administrator
Posts: 21257
Joined: Fri Oct 15, 2004 10:01 pm
Primary DAW OS: MacOS
Location: San Diego, CA - U.S.A.
Contact:

Don't forget the Trim!

Post by James Steele »

What about NVMe drives in USB4 enclosure? Do they even need trim? I guess since I’m using it for sample libraries it’s a “mostly read” situation.
JamesSteeleProject.com | Facebook | Instagram | Twitter

Mac Studio M1 Max, 64GB/2TB, MacOS 14.5 Public Beta, DP 11.31, MOTU 828es, MOTU 24Ai, MOTU MIDI Express XT, UAD-2 TB3 Satellite OCTO, Console 1 Mk2, Avid S3, NI Komplete Kontrol S88 Mk2, Red Type B, Millennia HV-3C, Warm Audio WA-2A, AudioScape 76F, Dean guitars, Marshall amps, etc., etc.!
User avatar
mikehalloran
Posts: 15242
Joined: Sun Jan 25, 2009 5:08 pm
Primary DAW OS: MacOS
Location: Sillie Con Valley

Re: Don't forget the Trim!

Post by mikehalloran »

James Steele wrote: Sun Sep 10, 2023 8:25 pm What about NVMe drives in USB4 enclosure? Do they even need trim? I guess since I’m using it for sample libraries it’s a “mostly read” situation.
TB4 is built on the USB 4 spec—possible that the only real difference is the fact that TB3/4 is licensed and certified by Intel. If connected via a TB3/4 cable, a blade in a USB 4 housing might support TRIM. I’ve not read one way or the other. I’ve been meaning to ask.

It will be easy to see in a System Report. TRIM Support will be Yes or No. There’s no way to enable or disable it. Garbage Collection is normally good enough but with TRIM, preparing cells for new data is a lot faster. I have recent experience wiping and rewriting nearly full 4TB SSDs.
DP 11.31; 828mkII FW, micro lite, M4, MTP/AV USB Firmware 2.0.1
2023 Mac Studio M2 8TB, 192GB RAM, OS Sonoma 14.4.1, USB4 8TB external, M-Audio AIR 192|14, Mackie ProFxv3 6/10/12; 2012 MBPs Catalina, Mojave
IK-NI-Izotope-PSP-Garritan-Antares, LogicPro X, Finale 27.4, Dorico 5.2, Notion 6, Overture 5, TwistedWave, DSP-Q 5, SmartScore64 Pro, Toast 20 Pro
User avatar
James Steele
Site Administrator
Posts: 21257
Joined: Fri Oct 15, 2004 10:01 pm
Primary DAW OS: MacOS
Location: San Diego, CA - U.S.A.
Contact:

Re: Don't forget the Trim!

Post by James Steele »

mikehalloran wrote: Sun Sep 10, 2023 8:42 pm
James Steele wrote: Sun Sep 10, 2023 8:25 pm What about NVMe drives in USB4 enclosure? Do they even need trim? I guess since I’m using it for sample libraries it’s a “mostly read” situation.
TB4 is built on the USB 4 spec—possible that the only real difference is the fact that TB3/4 is licensed and certified by Intel. If connected via a TB3/4 cable, a blade in a USB 4 housing might support TRIM. I’ve not read one way or the other. I’ve been meaning to ask.

It will be easy to see in a System Report. TRIM Support will be Yes or No. There’s no way to enable or disable it. Garbage Collection is normally good enough but with TRIM, preparing cells for new data is a lot faster. I have recent experience wiping and rewriting nearly full 4TB SSDs.
Only way I could see a reference to Trim Support was by navigating the the NVMExpress section and it shows me the WD Blue NVMe drive in my USB4 enclosure. it says that Trim is supported (indicated by the red arrow). I'm not sure if it's already operating this way, or I still have to force it with the Terminal?

What's interesting is the 209MB EFI volume thats formatted FAT32. I guess that's a standard thing. I'm pretty sure I reformatted that drive when I bought it to APFS... and you can see the Sample Libraries volume underneath the EFI volume that is indeed APFS format.

nvmeusb4trimsupport.jpg
nvmeusb4trimsupport.jpg (64.73 KiB) Viewed 2129 times
JamesSteeleProject.com | Facebook | Instagram | Twitter

Mac Studio M1 Max, 64GB/2TB, MacOS 14.5 Public Beta, DP 11.31, MOTU 828es, MOTU 24Ai, MOTU MIDI Express XT, UAD-2 TB3 Satellite OCTO, Console 1 Mk2, Avid S3, NI Komplete Kontrol S88 Mk2, Red Type B, Millennia HV-3C, Warm Audio WA-2A, AudioScape 76F, Dean guitars, Marshall amps, etc., etc.!
User avatar
mikehalloran
Posts: 15242
Joined: Sun Jan 25, 2009 5:08 pm
Primary DAW OS: MacOS
Location: Sillie Con Valley

Re: Don't forget the Trim!

Post by mikehalloran »

James Steele wrote: Sun Sep 10, 2023 9:42 pm
Only way I could see a reference to Trim Support was by navigating the the NVMExpress section. I'm not sure if it's already operating this way, or I still have to force it with the Terminal?

What's interesting is the 209MB EFI volume thats formatted FAT32. I guess that's a standard thing. I'm pretty sure I reformatted that drive when I bought it to APFS... and you can see the Sample Libraries volume underneath the EFI volume that is indeed APFS format
Now we know. TRIM is unblocked by default over USB 4. There’s no command to block or unblock except for 2.5" SSDs that I know of. When TB5 is released next year, it will be based on the USB 4.2 spec — safe to assume it will be the same.

It’s quite possible that the FAT32 volume is the culprit—GC only works in it?—but that’s a guess. Without knowing the drive firmware, that’s as good as I can do. Since unblocking TRIM solves the problem, I’d declare victory. Otherwise, there may be a firmware update for the drive that would address this.
DP 11.31; 828mkII FW, micro lite, M4, MTP/AV USB Firmware 2.0.1
2023 Mac Studio M2 8TB, 192GB RAM, OS Sonoma 14.4.1, USB4 8TB external, M-Audio AIR 192|14, Mackie ProFxv3 6/10/12; 2012 MBPs Catalina, Mojave
IK-NI-Izotope-PSP-Garritan-Antares, LogicPro X, Finale 27.4, Dorico 5.2, Notion 6, Overture 5, TwistedWave, DSP-Q 5, SmartScore64 Pro, Toast 20 Pro
User avatar
James Steele
Site Administrator
Posts: 21257
Joined: Fri Oct 15, 2004 10:01 pm
Primary DAW OS: MacOS
Location: San Diego, CA - U.S.A.
Contact:

Re: Don't forget the Trim!

Post by James Steele »

Yeah... the screenshot was from my Mac Studio in my studio. That's where I have the NVMe drive in the USB4 external case.

The problem I was having was with my MacPro in my office. I installed a 2.5" SSD into it had been the projects drive in a different MacPro that I used to use in my studio. It was solved when I force enabled trim on that drive.
JamesSteeleProject.com | Facebook | Instagram | Twitter

Mac Studio M1 Max, 64GB/2TB, MacOS 14.5 Public Beta, DP 11.31, MOTU 828es, MOTU 24Ai, MOTU MIDI Express XT, UAD-2 TB3 Satellite OCTO, Console 1 Mk2, Avid S3, NI Komplete Kontrol S88 Mk2, Red Type B, Millennia HV-3C, Warm Audio WA-2A, AudioScape 76F, Dean guitars, Marshall amps, etc., etc.!
User avatar
Michael Canavan
Posts: 3579
Joined: Fri Jul 15, 2005 10:01 pm
Primary DAW OS: MacOS
Location: seattle

Re: Don't forget the Trim!

Post by Michael Canavan »

James Steele wrote: Sun Sep 10, 2023 9:42 pm What's interesting is the 209MB EFI volume thats formatted FAT32. I guess that's a standard thing. I'm pretty sure I reformatted that drive when I bought it to APFS... and you can see the Sample Libraries volume underneath the EFI volume that is indeed APFS format.
Yeah that's a standard thing, I asked Western Digital about why the NVME USB3.3 Sandisk doesn't support SMART, and they suggested upgrading the EFI firmware using a PC, because it's a FAT32 file. There was some run that had issues, but that wasn't my problem at all.

USB3 on Mac OS doesn't support SMART to NVME drives. So IMO getting an NVME Sandisk like I have is a bad idea.

USB4 is great, so far no issues with the NVME in an USB4 enclosure at all.
M2 Studio Ultra, RME Babyface FS, Slate Raven Mti2, NI SL88 MKII, Linnstrument, MPC Live II, Launchpad MK3. Hundreds of plug ins.
User avatar
Phil O
Posts: 7232
Joined: Thu Jul 28, 2005 10:01 pm
Primary DAW OS: MacOS
Location: Scituate, MA

Re: Don't forget the Trim!

Post by Phil O »

Hey thanks for the reminder. I forgot to do that when I got my Mini. The externals were running without Trim enabled.

Your friendly neighborhood Phil
DP 11.23, 2020 M1 Mac Mini [9,1] (16 Gig RAM), Mac Pro 3GHz 8 core [6,1] (16 Gig RAM), OS 14.3.1/11.6.2, Lynx Aurora (n) 8tb, MOTU 8pre-es, MOTU M6, MOTU 828, Apogee Rosetta 800, UAD-2 Satellite, a truckload of outboard gear and plug-ins, and a partridge in a pear tree.
Post Reply