Yosemite, Trim Enabler, NV RAM reset & Safe Boot etc.

Macintosh software/hardware discussion and troubleshooting

Moderator: James Steele

User avatar
daniel.sneed
Posts: 2239
Joined: Sun Jan 23, 2005 10:01 pm
Primary DAW OS: MacOS
Location: France
Contact:

Re: Yosemite, Trim Enabler, NV RAM reset & Safe Boot etc.

Post by daniel.sneed »

Mike, of course, Disk Utility will not trim blocks in Yosemite, but it will in Mavericks. So, I boot from another drive.

BTW, you mean heavy fragmentation of files in an SSD drive will have no effect at all?
dAn Shakin' all over! :unicorn:
DP11.31, OS12.7.4, MacBookPro-i7-3.1Ghz-16GoRam-1ToSSD
Falcon, Kontakt, Ozone, RX, Unisum & Michelangelo, LX480
Waldorf Iridium & STVC & Blofeld, Kemper Profiler Stage, EWIusb, Studiologic VMK, ControlPad
JBL4326+4312sub, Behringer X32rack
Many mics, mandolins, banjos, guitars, flutes, melodions, xylos, kalimbas...
User avatar
mikehalloran
Posts: 15134
Joined: Sun Jan 25, 2009 5:08 pm
Primary DAW OS: MacOS
Location: Sillie Con Valley

Re: Yosemite, Trim Enabler, NV RAM reset & Safe Boot etc.

Post by mikehalloran »

BTW, you mean heavy fragmentation of files in an SSD drive will have no effect at all?
Correct and no one who knows about these is saying anything differently. I found this in Apple Support:

Writing takes longer and longer: writing causes a block of 64k to be freed before writing even when you only need to write a small file. Defragmenting causes loss of efficiency and speed. Also the "cells" only have a certain maximum of write cycles: demanding a need for "wear leveling" over all cells on the SSD: Again, defragmenting shortens the lifetime because the cells adjacent to each other are repeatedly stressed more than the free unused cells.

A deletion of a file does not result in freeing up cells, contrary of magnetic disks. The cell has to be freed up to accept a new file being written (on a magnetic disk a deleted file is not erased but simply overwritten). This is why write takes much more time than a read.

SSD controllers have a system of freeing up deleted file cells in the spare time between disk actions. A file deletion does not empty the cell, which is necessary for being able to be written.

Windows 7 and higher have a TRIM command in the OS that does the same thing even more efficiently. Apple OSX has it only for Apple built-in SSDs. Again, defragmenting is counterproductive to wear leveling and shortens lifetime and speed.

A curious other difference between SSD and HDD: when on a HDD a file is accidentally deleted, this file can be recuperated as long as the space is not being rewritten. On a SSD, the wear leveling action of frees up cells to be written without erasing the cells first. This lowers the chance that a accidentally deleted file can be recuperated.


According to Apple, fragmentation isn't an issue with mechanical hard drives either. Even though I defrag mine every other year or so, I'm pretty sure they're right. This is why Alsoft never came out with an OS X version of theirs that I used religiously in OS 7 – they agreed with Apple but said it didn't do any harm, either (they told me this when I asked years ago).

Publicly, Micromat and others only say that their defragmenting routines will not run if an SSD is detected – and I can confirm that they don't. Privately, engineers shake their head at the irresponsible nature of what certain outfits will do to keep the $19.99 upgrades and $39.99 new orders coming in.
:koolaid:
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, 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: 9712
Joined: Tue Jan 10, 2006 9:01 am
Primary DAW OS: MacOS
Location: Rancho Bohemia, California
Contact:

Re: Yosemite, Trim Enabler, NV RAM reset & Safe Boot etc.

Post by HCMarkus »

mikehalloran wrote:If Disk Utility is trimming unused blocks in Yosemite, you must have an Apple SSD or that Austrian drive that fools the OS.
…or have enabled Trim (via Trim Enabler or other approach) on whatever boot drive you are running from when you run Repair Disc in Disc Utility.

Repair Disc will only repair your boot drive if run from a different boot drive. Again, that drive (which can be SSD or spinner) must have Trim enabled in order for Trim to be applied as part of the Repair Disc operation.

Thanks for the guide Mike. Good stuff.
User avatar
daniel.sneed
Posts: 2239
Joined: Sun Jan 23, 2005 10:01 pm
Primary DAW OS: MacOS
Location: France
Contact:

Re: Yosemite, Trim Enabler, NV RAM reset & Safe Boot etc.

Post by daniel.sneed »

Thanks for your posts, Markus and Mike.

In Mavericks, repairing an SSD with OS Disk Utility, will report *Trim unused block*.
Isn't that what Trim Enabler does?
dAn Shakin' all over! :unicorn:
DP11.31, OS12.7.4, MacBookPro-i7-3.1Ghz-16GoRam-1ToSSD
Falcon, Kontakt, Ozone, RX, Unisum & Michelangelo, LX480
Waldorf Iridium & STVC & Blofeld, Kemper Profiler Stage, EWIusb, Studiologic VMK, ControlPad
JBL4326+4312sub, Behringer X32rack
Many mics, mandolins, banjos, guitars, flutes, melodions, xylos, kalimbas...
User avatar
HCMarkus
Posts: 9712
Joined: Tue Jan 10, 2006 9:01 am
Primary DAW OS: MacOS
Location: Rancho Bohemia, California
Contact:

Re: Yosemite, Trim Enabler, NV RAM reset & Safe Boot etc.

Post by HCMarkus »

daniel.sneed wrote:Thanks for your posts, Markus and Mike.

In Mavericks, repairing an SSD with OS Disk Utility, will report *Trim unused block*.
Isn't that what Trim Enabler does?
Trim Enabler allows Trim to work with non-Apple OEM SSDs. If you are using Apple OEM drives only, you do not need Trim Enabler.

You can also enable Trim directly via Terminal; Trim Enabler merely simplifies the process of turning Trim on and off for non-Apple OEM SSDs.

If you see the "Trimming Unused Blocks" message in Disc Utility, it means either:
  • You have an Apple OEM SSD in your computer, or
    You have enabled Trim for non-OEM SSDs.
User avatar
mikehalloran
Posts: 15134
Joined: Sun Jan 25, 2009 5:08 pm
Primary DAW OS: MacOS
Location: Sillie Con Valley

Re: Yosemite, Trim Enabler, NV RAM reset & Safe Boot etc.

Post by mikehalloran »

You can also enable Trim directly via Terminal;
Yes, that's easy in Mavericks.

I have not found a set of commands that work in Yosemite, even those that also claim to turn off Kext signing. Have you?

I know that's what Trim Enabler does and, for $10 ( paid the shareware fee), I'm happy not to be bothered with it.
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, 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
daniel.sneed
Posts: 2239
Joined: Sun Jan 23, 2005 10:01 pm
Primary DAW OS: MacOS
Location: France
Contact:

Re: Yosemite, Trim Enabler, NV RAM reset & Safe Boot etc.

Post by daniel.sneed »

You nailed it right, Markus.
Didn't remember my Mavericks (spare) drive has Trim Enabler on, while Yosemite (working) drive has Trim Enabler off.
Thanx for bringing light on this!

BTW, for some reasons already stated hear, I won't set Trim Enabler on in Yosemite, for chances are of total wreck in some particular circumstances.
Can't imagine that on a deadline or in a gig...
dAn Shakin' all over! :unicorn:
DP11.31, OS12.7.4, MacBookPro-i7-3.1Ghz-16GoRam-1ToSSD
Falcon, Kontakt, Ozone, RX, Unisum & Michelangelo, LX480
Waldorf Iridium & STVC & Blofeld, Kemper Profiler Stage, EWIusb, Studiologic VMK, ControlPad
JBL4326+4312sub, Behringer X32rack
Many mics, mandolins, banjos, guitars, flutes, melodions, xylos, kalimbas...
User avatar
kgdrum
Posts: 4068
Joined: Tue Nov 16, 2004 10:01 pm
Primary DAW OS: MacOS
Location: NYC

Re: Yosemite, Trim Enabler, NV RAM reset & Safe Boot etc.

Post by kgdrum »

I must admit I'm a bit confused with this thread,what's new? ;-)

I'm using an Samsung 840 Pro SSD in Mountain Lion 10.85, I purchased Trim Enabler set it to on assuming I could leave it on & it would do it's thing.
So now am I understanding correctly I should set it to off and only switch it on & use it via Disk Utility when I want the SSD to be trimmed?

Thanks
2012 Mac Pro 3.46GHz 12 core 96 gig,Mojave, DP11.01,Logic 10.51, RME UCX,Great River ME-1NV,a few microphones,UAD2, Komplete 12U,U-he,Omni & way too many VI's,Synths & FX galore!, Mimic Pro w/ SD3,Focal Twin 6 monitors, Shunyata...........
User avatar
HCMarkus
Posts: 9712
Joined: Tue Jan 10, 2006 9:01 am
Primary DAW OS: MacOS
Location: Rancho Bohemia, California
Contact:

Re: Yosemite, Trim Enabler, NV RAM reset & Safe Boot etc.

Post by HCMarkus »

The potential issues arise in Yosemite, kg.
Read this, and you will understand:

https://www.cindori.org/trim-enabler-and-yosemite/

Leave it enabled under Mountain Lion for sure. Under Yosemite, one must make some choices.
User avatar
mikehalloran
Posts: 15134
Joined: Sun Jan 25, 2009 5:08 pm
Primary DAW OS: MacOS
Location: Sillie Con Valley

Re: Yosemite, Trim Enabler, NV RAM reset & Safe Boot etc.

Post by mikehalloran »

I stated the point of this thread in my first post and later. It has wandered off topic a few times.

There are a few things that, if you aren't aware and do them, can cause your Mac not to boot if running Yosemite and have Trim Enabler.app running. Resetting the NV RAM is the one that everyone knows. Doing a Safe Boot and installing Soundflower are two that I have found. If you remember to turn Trim Enabler to Off and reboot before doing any of these three tasks, you are ok.

I am curious to know if there is anything else out there. I don't know if resetting the ACLs to default can cause this but I will find out.
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, 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
kgdrum
Posts: 4068
Joined: Tue Nov 16, 2004 10:01 pm
Primary DAW OS: MacOS
Location: NYC

Re: Yosemite, Trim Enabler, NV RAM reset & Safe Boot etc.

Post by kgdrum »

HCMarkus wrote:The potential issues arise in Yosemite, kg.
Read this, and you will understand:

https://www.cindori.org/trim-enabler-and-yosemite/

Leave it enabled under Mountain Lion for sure. Under Yosemite, one must make some choices.

& does it automatically trim as I assumed or do I have to run it periodically?

Thanks
2012 Mac Pro 3.46GHz 12 core 96 gig,Mojave, DP11.01,Logic 10.51, RME UCX,Great River ME-1NV,a few microphones,UAD2, Komplete 12U,U-he,Omni & way too many VI's,Synths & FX galore!, Mimic Pro w/ SD3,Focal Twin 6 monitors, Shunyata...........
User avatar
HCMarkus
Posts: 9712
Joined: Tue Jan 10, 2006 9:01 am
Primary DAW OS: MacOS
Location: Rancho Bohemia, California
Contact:

Re: Yosemite, Trim Enabler, NV RAM reset & Safe Boot etc.

Post by HCMarkus »

If Trim is enabled (i.e. unblocked for non-Apple OEM SSDS) under any version of Mac OS it is a continuous, automatic process. Apple OEM SSDs do not require Trim to be enabled, as Mac OS does not block Trim for Apple OEM drives. Although Trim is clearly not required to use SSDs, those who question its usefulness might well ask why Apple enables it for all of their OEM SSDs...

If you have been using a non-OEM SSD for a while without Trim enabled, it is a good idea to run a Repair Disc operation in Disc Utility, which will Trim all data that was erased before Trim was enabled. If the drive you want to Trim is your boot drive, you must boot from a separate drive, and Trim must be enabled in the OS on that separate drive before you run the Repair Disc operation. This is the approach used by some who prefer to avoid the issues related to Kext Signing under Yosemite that Mike so kindly guides us through in his first post.

Review of Cindori's website (as Mike linked to in the first post) suggests Cindori is working on an update to Trim Enabler that will simplify the periodic approach to using Trim.
User avatar
daniel.sneed
Posts: 2239
Joined: Sun Jan 23, 2005 10:01 pm
Primary DAW OS: MacOS
Location: France
Contact:

Re: Yosemite, Trim Enabler, NV RAM reset & Safe Boot etc.

Post by daniel.sneed »

By this computer ages, Motunation is such a great place to be!
dAn Shakin' all over! :unicorn:
DP11.31, OS12.7.4, MacBookPro-i7-3.1Ghz-16GoRam-1ToSSD
Falcon, Kontakt, Ozone, RX, Unisum & Michelangelo, LX480
Waldorf Iridium & STVC & Blofeld, Kemper Profiler Stage, EWIusb, Studiologic VMK, ControlPad
JBL4326+4312sub, Behringer X32rack
Many mics, mandolins, banjos, guitars, flutes, melodions, xylos, kalimbas...
User avatar
mikehalloran
Posts: 15134
Joined: Sun Jan 25, 2009 5:08 pm
Primary DAW OS: MacOS
Location: Sillie Con Valley

Re: Yosemite, Trim Enabler, NV RAM reset & Safe Boot etc.

Post by mikehalloran »

I tested Trim Enabler in an eDrive partition created by TechTool Pro 8.0.1 and it works fine to TRIM another drive or partition when you run Apple Disk Utility. No problems.

Disk Warrior 4.4 works but is very slow when Trim Enabler is active on the drive where it is running. We're talking DW 3 in OS 10.5 slow. I don't get this one at all.

As DW hasn't been useful since OS 10.4, I will not upgrade to DW 5, even if it is 64bit. I can get dinner with my wife for the same $60. If your directory becomes corrupted so that it affects performance, try to fix it in Disk Utility, get the data off of it and replace the drive. Really.
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, 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: 9712
Joined: Tue Jan 10, 2006 9:01 am
Primary DAW OS: MacOS
Location: Rancho Bohemia, California
Contact:

Re: Yosemite, Trim Enabler, NV RAM reset & Safe Boot etc.

Post by HCMarkus »

Found this nice discussion of how Trim and Garbage Collection ("GC") work together at http://www.thessdreview.com/daily-news/ ... d-primer/2
(T)he TRIM command enables the OS to notify the SSD that old data is no longer valid about the time it deletes the logical block addresses from its logical table. The advantage of the TRIM command is that it enables the SSD’s GC to skip the invalid data rather than moving it, thus saving time not rewriting the invalid data. This results in a reduction of the number of erase cycles on the flash memory and enables higher performance during writes. The SSD doesn’t need to immediately delete or garbage collect these locations it just marks them as no longer valid.
Cindori (who developed the aforementioned very easy to use Trim Enabler software available at https://www.cindori.org/software/trimenabler) had this to say at MacRumors:
As for OWC drives and Trim in general, their drives support Trim, and use Trim in Windows, so saying it's bad for the drive is quite... contradicting. In fact, by the design of Trim, it's not forced by the OS (or by Trim Enabler), but rather, it's a request that is sent to the drive controller, which then can decide for itself if it should perform the Trim.
Post Reply