ssd-trim-feature-image

TRIM & Drive Optimization Explained

Defragmentation and Trim are both methods to optimize a drive; the former is used to optimize HDDs and the latter to optimize SSDs.

Windows includes a feature that automatically optimizes drives; the feature is enabled and set to weekly optimization by default. Windows identifies each drive type and applies the correct form of optimization process accordingly – defragmentation for HDDs and Trim for SSDs.

What Is Trim

optimize-drive-interface

There has been a lot written about how Trim works, much of which is quite technical. What follows then is a simplified explanation in layman’s terms.

Most of you will be aware that when you delete a file, it is not actually removed from the drive, but rather the space it occupied is marked as free to use. However, there is an important difference between the way in which HDDs and SSDs handle this situation.

SSDs cannot simply overwrite existing data in the way an HDD can. Instead, any invalid (unused) data needs to be erased. The Trim command tells the SSD what specific areas contain data that is no longer in use and can be removed. The next time the computer is idle, Active Garbage Collection will then delete that data.

What Is Garbage Collection

Garbage collection is a mechanism common to all SSDs that works in conjunction with Trim. Trim first identifies unused data, and Garbage Collection then clears out that unused data.

In order to clear unused data, any valid data within those blocks must first be written to a new block, and then both valid data (still in use) and invalid data (unused) can be cleared from the original blocks, thereby freeing up those blocks for rewrites.

If the drive were not to go through this process of moving valid data so that invalid data can be deleted and, instead, just keep writing new data to new blocks, the drive would eventually (and comparatively quickly) fill up with data.

How To Check Drive Optimization Status

Drive optimization plays an important role in maintaining an overall responsive system. To make sure automatic drive optimization is enabled on your system, open the Start menu and type defragment, then click on the top result:

optimize-drive

5 thoughts on “TRIM & Drive Optimization Explained”

  1. Thank you Jim for the easy to read explanation (as always). I prefer to keep the Trim in the Off position and do the task manually every month. Not sure if the automatic process can interfere with something else the computer is doing, Mindblower!

    1. Hey MB,

      Automatic optimization should only ever activate when the system is idle. It’s set that way specifically so it won’t interfere with other activities.

  2. I have 2 old SS drives, but defrag doesn’t recognize them as such, so they are not trimmed. defragmentation thinks they are regular hard drives. Can this situation be fixed?

  3. Jim, All was well until I checked the optimization status of my drives.
    I have one external drive that reports “Optimization not available…”. If I open the properties of the drive and try to “Optimize” it under the Tools tab I get the following;
    “The Disk Defragmenter is not installed on your computer. To install it, double-click the Add or Remove Programs icon in Control Panel, click the Install/Uninstall tab, and then follow the instructions on your screen.” The instructions don’t make sense, I can uninstall any program, but I cannot install “Disk Defragmenter”. I didn’t find a way on the Microsoft site to install it either.
    A check of my other drives where I try to “Optimize” any of them under the Tools tab, results in the same error message that “Disk Defragmenter is not installed”. Yet, they as OK in the Optimize Drive window.

Leave a Reply to Jim Hillier Cancel Reply

Your email address will not be published. Required fields are marked *

Scroll to Top