How to activate the TRIM command and why you should do if you are using an SSD hard drive
Over the past couple of years, SSDs have gained increasing popularity among desktop users and even the best laptops. We do not exclude that you have read or at least heard someone talk about how fast these units are when compared to old HDDs, as they make a big difference in the level of performance and upgrades that must be taken into account.
But if you are already using an SSD or you plan to buy an SSD under the optimization of your computer's performance, it is necessary to have an idea of the TRIM command and why it is important for SSD storage, and how can you check if it works or not in Windows? In this article, we will answer all these questions, so let's start directly from the following lines.
As you probably may know, when you delete a file in Windows it marks that file as unavailable in the file system, and the storage space it used to occupy becomes writable to new data, while all the file data still exists.
This is actually what gives Recovery software the ability to easily recover deleted files - it works to read the data of the deleted file again and then store it in another place that is the place specified by the user to save the files and thus the file becomes accessible again. This highlights the difference between how HDDs and SSDs work.
Hard disks can write data to space previously occupied by the deleted file whenever it needs to store new data. While SSDs cannot do this - the flash memory must first be completely erased - where the deleted file was located - and then write the new data. This may make data writing slower compared to traditional hard disks, and it also causes rapid wear and tear of the flash memory chips inside the SSD.
The alternative solution is to activate the TRIM command so that the next time you delete a file, the hard disk does not scan the entire blocks but deals with small parts of the block called "pages" that contained the deleted file, it cleans them completely. This ensures faster write speed when new data is stored in those parts later.
This is very important to maintain the performance and life of the SSD, but on the other hand, it also means that any file you delete will not leave any trace on the hard drive; that is, you will not be able to recover it again with Recovery programs, so think twice before clicking the Delete key.
You should read also:- 5 steps do now to maximize SSD performance on Windows
First: Check if the TRIM command is already activated
If you are using Windows 8, 8.1 or 10, you may not need to activate the TRIM command manually because Windows does this automatically if your device has an SSD volume and even NVMe M.2 SSD, but this does not apply to all types of these units, so you should check if TRIM is turned on or you should activate it yourself.
To check if the TRIM command is active on Windows, you can use the plugin provided by the manufacturer, which is usually installed automatically after installing the SSD in the device, such as Samsung Magician for SSDs of all types from Samsung, Storage Executive for Crucial disks, SSD Manager from Kingston, and SSD Dashboard from SanDisk. After running the program, you should find a signal showing you the status of the TRIM command, whether Enabled or Disabled.
Alternatively, you can take advantage of the Command Prompt, but you must first run it with "Administrator Privileges" so right-click the Start menu on the taskbar, then choose from the Command Prompt menu (Admin. or search within the Start menu for CMD, then right-click on Command Prompt and choose from the list Run as Administrator.
In the black command prompt window that has appeared in front of you on the screen, type the command attached below and press Enter:
fsutil behavior query DisableDeleteNotify
You will see one of two results. If you see DisableDeleteNotify = 0 it means that the TRIM command is working, and you don't need to activate it. While if you find DisableDeleteNotify = 1 it indicates that the TRIM command is not enabled, and this is a problem if you have an SSD.
Second: How to activate the TRIM command
Windows should activate the TRIM command automatically if you have a recent version of the operating system with a recent SSD volume as well. But if you do the verification steps that I listed in the previous lines and discover that it does not work, it may be because the SSD you are using is very old. However, it is also possible to activate TRIM manually in multiple ways.
The first and easiest way is to use the plugin provided by the manufacturer such as the one mentioned above, besides displaying the status of the TRIM command it can also be compulsorily activated if Windows does not activate on its own for any reason. Of course, the method varies from one program to another, but you should find this option in the program after searching the settings.
Let's take the SanDisk SSD Dashboard program for example, after running it, go to the Performance section, then in the Optimization pane on the left side, press TRIM and then put a check mark next to "Enable Windows TRIM" and thus activate the TRIM command - that easy!
If you don't find any trace of the option that enables the TRIM command in the plugin, you can use the Windows Command Prompt instead. You also need to run the command prompt with administrator privileges, then type the attached command and continue by clicking the Enter button:
fsutil behavior set DisableDeleteNotify 0
After that, you will see a message "DisableDeleteNotify = 0" indicating that the process of activating the TRIM command on the SSD has succeeded.
Conclusion: SSD volumes are fast and efficient when it comes to read or write speeds, they are much faster than traditional hard drives. However, because of the way they handle digital data, SSDs must use software solutions to prevent performance degradation in the short term and that's why the TRIM command should be activated – something that will only take a few minutes to finish.