SSD TRIM and Data Recovery.
The SSD TRIM Advanced Technology Attachment interface command allows NAND solid-state drives (SSDs) to function efficiently. NAND flash technology can only write to a reset storage cell it cannot overwrite previously toggled cells. As such the hard drive controller firstly re-sets a storage cell and then toggles it to its new binary condition. This need to firstly reset storage cells and then set them to a new condition as a part of its write cycle, potentially adversely affects the efficiency of the drive and its write access times.
The TRIM command is used by the SSD controller under an executable background process that is a part of the computer operating system. The process runs in background and maps the cells that are to be made available to be written to. By doing so the drive SSD operation is made more efficient. The execution of the TRIM command is generally optional but is implemented by default in many operating systems
Operating Systems prioritize efficiency of the SSD and determine that recently deleted data areas are TRIM’ d and mapped ready to be written to. The downside of this operation is that user deleted data (clearing the re-cycle bin) is not available to Data Recovery Scavenger programs.
The process that uses TRIM is euphemistically termed Garbage Collection. Garbage collection algorithms are relatively complex The goal of garbage collection is to keep as many empty blocks as possible, so that when the SSD needs to write data, it can do so without waiting for a block to be erased.
Garbage Collection
Garbage collection manages and maintains the available storage space, handling the disparity between the erase unit size (block) and the read/write unit size (page). When a previously written block is targeted for garbage collection, the valid data pages are gathered up and moved to another block on the SSD so that the block containing the old, invalid data pages can be erased. Garbage collection may wait for lulls in drive activity to initiate the process, sometimes leaving pages that are obsolete in the SSD.
In order for TRIM to function, the host’s OS must support it. With an SSD machine running Windows OS TRIM will be enabled and Defrag disabled.
Benefits of using SSD TRIM
The SSD TRIM control provides improved hard drive performance and longer cell life. Using the TRIM command reduces the amount of data an SSD needs to move during the garbage collection process and reduces the amount of erase cycles which means the drive will last longer without failure. With TRIM enabled unnecessary copying of invalid data is avoided and the SSD failure probability improved.
Enabling SSD TRIM.
The TRIM command is an essential feature for use with an SSD, TRIM means performance is maintained as optimum and also extends the life of the SSD. Here’s how to make sure the feature is enabled on Windows 10.
Use the Windows key + X keyboard shortcut to open the Power User menu and select Command Prompt (Admin). Type the following Command:
fsutil behavior query DisableDeleteNotify
Press Enter:
Explanation: If after executing the fsutil command with the DisableDeleteNotify you get a result of zero (0) then it means that TRIM is enabled, and no further action is required. However, if after running the command you see a result of one (1), then it means that TRIM is disabled
Windows Command Prompt
Using the TRIM Command
How to enable TRIM:
When TRIM isn’t enabled on Windows 10, you need to do the following:
Use the Windows key + X keyboard shortcut to open the Power User menu and select Command Prompt (Admin)
Type the following command and press Enter:
fsutil behavior set DisableDeleteNotify 0
After running the command, you will notice the same DisableDeleteNotify = 0, which indicates that the feature is enabled.
How to disable TRIM;
If at any time for any reason you need to disable TRIM, you need to do the following:
Use the Windows key + Xkeyboard shortcut to open the Power User menu and select :
Command Prompt (Admin)
Type the following command and press Enter::
fsutil behavior set DisableDeleteNotify 1