Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Enable TRIM before installing OSX & Apps?

Hello everyone, I just ordered my Samsung 840 Pro 128GB SSD. If I boot from my regular HDD and enable TRIM from there, will it be active during the fresh installation of OSX? If not, will it harm the SSD not to have it on during the installation? I will turn it on before installing Apps, but it won't be on during the istallation of OSX.


Also, should I install apps from the original installer, or just restore from backup (I want max. perfomance)?


Thanks

MacBook Pro, OS X Mountain Lion

Posted on Jun 10, 2013 6:17 AM

Reply
Question marked as Best reply

Posted on Jun 10, 2013 6:24 AM

You can only activate TRIM once a ssd is installed. TRIM will not enable on a standard drive.


Once you clone your original install or do a clean install of os x then the first thing to do is enable TRIM support.


It is software in the os not hardware. So it can't be enabled before the os is installed.

21 replies

Jun 10, 2013 6:37 AM in response to moritzhberg

moritzhberg wrote:


Hello everyone, I just ordered my Samsung 840 Pro 128GB SSD. If I boot from my regular HDD and enable TRIM from there, will it be active during the fresh installation of OSX? If not, will it harm the SSD not to have it on during the installation?

TRIM will not be active when you use a 3rd party SSD and you are reinstalling OS X or installing any OS X updates (e.g. 10.8.4). It will need to be re-enabled using the one of the various hacks (e.g Trim Enabler). Your SSD will not be harmed during the install or afterwards. Most new SSDs come with garbarge collection which negates having TRIM enabled in the OS. I don't know about the Samsung 840 Pro series.


I have an Intel 520 Series SSD and do not have TRIM in OS X since it has garbage collection. It's performance is still outstanding.

Jun 10, 2013 7:11 AM in response to moritzhberg

No (I thought I made that clear in my first post). It is Software in the os. It is not the computer hardware. Without a os install on the drive TRIM is not active and it can't be activated until a operating system is install on the SSD.

moritzhberg wrote:


I have OS X installed on the HDD atm. If I enable TRIM as soon as I install the SSD (from the OS on the HDD), will it be active during installation? I don't think so, as TRIM will only work within the OS it's installed, and so won't take effect if I boot from a recovery USB drive (correct me if I'm wrong).


Thanks for your help & support

Jun 10, 2013 7:48 PM in response to moritzhberg

moritzhberg wrote:


I really don't want to sound thick or anything, but are TRIM and Garbage collection the same thing?


"Most new SSDs come with garbarge collection which negates having TRIM enabled in the OS", from this, I would derive that I don't need to enable TRIM, as garbage collection will take care of it, right?


Sorry for being so complicated...

That's hardly being thick - it's a complicated question and I don't think there's a definite answer because controller and firmware variations of the SSD combined with the platform all this is going on in can change the answer.


As I understand it, garbage collection deals with the fact that unlike a HD, the pages on an SSD can't be written to until they're first actively erased, and, again unlike HD's, much larger blocks, containing many pages, are the smallest units that can be erased even though individual pages on them can be written to. When pages need to be overwritten, this process becomes necessary. Since in those blocks are pages of valid data which are not due for erasure, they have to be moved before any erasing can take place. The accumulation of valid data being written into fresh or newly erased blocks and the erasing of the now cleared blocks is the garbage collection process, and some controllers may do that garbage collection when space is needed, while others anticipate the need and operate when there's free time, and still others do both. In either case, the OS telling the SSD to overwrite files at LBA's (logical block addresses) gets the ball rolling. That doesn't apply to files on pages the OS simply declares no longer valid. As such, when a block has to be relocated prior to erasure, the no longer valid files get moved along with the valid data because the SSD's don't know that the files, not having been explicitly overwritten, are no longer valid.


TRIM is a communication between the OS and the SSD controller that newly invalid but not overwritten files should be erased too. As such, it's an adjunct to regular garbage collection but there is some overlap and a difference in timing. So while garbage collection will get the job done, it will be moving and writing pages which don't have to be, and since the number of writes to any page is limited, more writes than necessary are to be avoided when possible. This extra writing is known as write amplification. To quote Wikepedia, "Write amplification (WA) is an undesirable phenomenon associated with flash memory and solid-state drives (SSDs) where the actual amount of physical information written is a multiple of the logical amount intended to be written. Because flash memory must be erased before it can be rewritten, the process to perform these operations results in moving (or rewriting) user data and metadata more than once. This multiplying effect increases the number of writes required over the life of the SSD which shortens the time it can reliably operate." TRIM helps to reduce write amplification. Put another way, you can get there from here without TRIM, just not as well.


And to quote you, "sorry to be so complicated." There are times when I miss hard disks.😉

Jun 11, 2013 3:23 AM in response to FatMac-MacPro

Wow, thanks for the detailed answer! What I'll be doing is install OS X, and before proceeding, enable Trim via Trim Enabler. Then I will install apps etc. Would you recommend a restore from backup or reinstall the apps from the original installer?


Thanks for your help!


Oh yeah, given that SD cards and USB Thumb drives are also flash drives, do they not need Trim?

Jun 11, 2013 7:17 AM in response to moritzhberg

Glad to help but please understand that I'm still learning this myself so the information comes without any warranty, expressed or implied, as they say.😉


And speaking of complicated, there's more than one way to bring your new boot drive up to speed and still have your prior, familiar program collection, and in my experience, not all of them work equally well. If your programs are licensed and the publisher is keeping count, reinstalling from the original installer may require you to first uninstall the current installation to free-up the license. I've found that sometimes, migrating will be seen by software as a new install which needs to be reauthorized. I've also found that if you've set up a customized network, it may get left behind during the migration. I'm sure other things get lost along the way too. So either way, things may get complicated. But that's the potential penalty of going with an entirely fresh install of the OS on a bare drive.


As an alternative, clone your HD to the SSD and then run the OS installer on the SSD while it's attached to your Mac. You'll get a largely fresh OS installation but keep what's unique about your current boot drive. Since you're putting a new drive into the current Mac rather than moving the current drive to a new Mac, there won't be any customization of the OS for new hardware. If, for any reason, it carries over issues you currently have, then you can start the fresh install/migration routine.


As to SD cards and Thumb drives, I don't think they'd get used in the same way as SSD's so the need for TRIM-like commands should be much less. But as far as I can tell, TRIM is associated with the SATA protocol, which leaves out USB connections. There are commands similar to TRIM for SCSI and SD/MMC cards but I doubt TRIM on the Mac would trigger them. Like I said, I'm still learning.

Jun 11, 2013 1:27 PM in response to FatMac-MacPro

Thanks for the detailed answers, what I'm going to do, is clean install the OS on the SSD. Then I will create a DMG of my Home folder with Disk Utility enable Trim, and install Apps. Then I'll wipe my HDD anad clone the Home folder DMG to it. Then in system preferences > Accounts, I will point OS X to the new location of the home folder, restart & my Mac will be as I left it.


I really hope that will work without issues.

Enable TRIM before installing OSX & Apps?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.