Mac Performance Tip: Activating TRIM on Your 3rd Party SSD

SSD’s are in my opinion the only storage operating systems should be installed to. Spinning drives are for archives and long time storage, not fast data access. While older Macs can easily be physically upgraded with an SSD, it doesn’t necessary mean that the performance is there to stay, unless you manually enable TRIM after installing the OS

After upgrading my MacBook Pro 2011 with a Samsung 256 SSD, the computer finally got a boost in performance. Going from 50-70MB/s on the old spinning drive, I was now seing several hundreds of megabytes per second instead, making every task snappy on the old MacBook which now performs as a brand new computer. After a while though, the performance boost was “wearing off”, and I was seeing everything from 30-100MB/s instead. Read performance was still somewhat good, so it didn’t affect performance that much, but I definitely started seeing some issues when editing movies in Final Cut Pro.

skjermbilde-2017-01-25-kl-15-33-14

The reason for this is “garbage” filling up on the SSD. TRIM is disabled by default on all non-Apple OEM SSD’s. You have to manually enable this through a fairly simple command in terminal to activate it after you install Mac OS X. El Capitan and newer does have support for third party SSD’s as you might have read somewhere, but it doesn’t not enable TRIM for you. You can check this by clicking “About This Mac -> System Report -> SATA/SATA Express”. Click your SSD, and you’ll see a line called “TRIM-Support” and probably “No” behind it. To fix this, you go to terminal and write the command

sudo trimforce enable
skjermbilde-2017-01-25-kl-15-56-29

Enabling TRIM

screen-shot-2017-01-25-at-16-00-09

After a reboot, TRIM is enabled

That’s it. You’ll be prompted with a warning that issuing this command is at your risk. And be aware that I have actually had problems booting a Mac after this, but “repairing” the Mac OS X installation fixed it, and I have never since had any problems. This is also the only time I have ever had any issues with this command. To be absolutely safe though, make sure you have a full system backup in case something should happen. My absolute recommendation is to run this command on a freshly installed system where you have no important data, to be sure no data loss or corruption can happen. But again, I’ve only experienced a problem once, and I did not lose any data or experience any problems further on.

Your computer will reboot immediately after running the command, and you should after a while find that the computer is now performing as it did when the SSD was new. You can also force TRIM to happen with Disk Utility and “Disk Repair”, it issues a TRIM command at the end. It will run in the background on your system anyways, but this way you might get the performance back a bit sooner.

screen-shot-2017-01-25-at-16-04-16

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s