Written byAnna Yuan
SSD TRIM: What Is SSD TRIM and How to Enable SSD TRIM on Mac?
Summary: This post is about what SSD TRIM is and its benefits. It also covers how to check if SSD TRIM is enabled on Mac and the guide to turn it on.
If you are using an SSD or you want to buy a new SSD, you should know what SSD TRIM is and why it matters for SSDs. Keep reading to find the answer to your doubts about SSD TRIM and this post also tells you how to enable SSD TRIM on Mac.
Table of Contents:
- 1. What is SSD TRIM
- 2. Why is TRIM useful for SSD
- 3. How to check if SSD TRIM is enabled
- 4. How to enable SSD TRIM on a Mac
- 5. Conclusion about SSD TRIM
What is SSD TRIM
SSD TRIM, known as an Advanced Technology Attachment (ATA) command, tells an SSD which data blocks it can erase with the help of the operating system since they are no longer in use.
In addition to the ATA interface, TRIM is also available for SSDs that support the SATA interface. SSDs with other different interfaces also have a similar command like TRIM. For example, SCSI provides the UNMAP command - A full analog of TRIM.
Usually, the SSD TRIM command works with Active Garbage Collection to clean up and organize your solid-state drive. When you delete a document on your SSD, the area of the SSD that contains the deleting data is marked as no longer used. Then The SSD TRIM command tells the drive that the data can be erased. The next time when the computer is idle, Active Garbage Collection will delete the data.
Why is TRIM useful for SSD?
If there is no SSD TRIM command on your solid-state drive, then your SSD would not know which sectors in the drive contained useless information. Thus, when writing the new information to that sector, the drive needs to erase the existing information first.
It takes slightly more time to do than just writing the new information, so using TRIM Command can speed up the write performance of the drive. And this is also the reason why SSDs have a faster speed of read-write when talking about SSD vs. HDD.
On the other hand, TRIM also helps prolong the life of SSDs. If data is written and erased from the same cells all the time, those cells will lose integrity. So to optimize the storage space and extend longevity, SSD TRIM command and Active Garbage Collection work with wear leveling, an algorithm that ensures that each cell is written to and deleted from about the same number of times as all the other cells.
How to check if SSD TRIM is enabled
Generally, the SSD TRIM command is enabled by default on MacBooks. But if you want to have a check, here's how to do:
- Click on the Apple icon (top-right corner) then choose About This Mac. Then click on System Report. Or press and hold down the Option key and then select System Information.
- On the left pane of the System Information window, under Hardware, Find NVM Express or SATA/SATA Express. It depends on what the interface of your Mac internal SSD is.
- On the right pane, scroll down until you find TRIM Support. If it appears Yes, then the TRIM command is running. If it appears No and you want to turn it on, then you can enable SSD TRIM manually.
How to enable SSD TRIM on a Mac
Before turning SSD TRIM on, make sure you're logged into your Mac with an account that has Administrator privileges. Then do the following:
- Open Launchpad > Other, run Terminal. Or you can find it with Spotlight by pressing Command + Space key combinations.
- Type in this command and press Enter:>sudo trimforce enable
- Type your password when prompted, and hit Enter.
- The system will display a notice, then ask you if you are sure you wish to proceed. Type in "y" and then press enter.
- The system will then indicate that it will reboot and ask you if that's OK. Type "y" again then press enter.
Now wait for the system to restart by itself and you're done. If you check again, you will see that TRIM is now running on the system.
Note: Make sure you have backup all your important files before enabling TRIM. Failures caused by the TRIM command may cause non-recoverable data loss.
Conclusion about SSD TRIM
Though SSD TRIM is a useful tool that can benefit the speed, function, and longevity of your SSD, it still has drawbacks. And the most serious shortage is that recovering deleted files on the SSD drives for which the TRIM command is enabled is impossible. So be careful when you empty Mac Trash.