What's Actually Going On?

Windows includes a built-in tool called Optimize Drives. On older hard drives this tool performs defragmentation. On modern SSDs it performs a different operation called TRIM. Because SSDs work differently than traditional hard drives, they do not need defragmentation in the same way. Instead, they benefit from periodic trimming. This is where the confusion often arises. People see the same tool being used for both types of drives and assume it does the same thing. Most people have been adviced for years to not do defragmentation on their SSDs, as it can cause unnecessary wear. However, the Optimize Drives tool is smart enough to know the difference and will perform the appropriate optimization based on the drive type.

Defragmentation vs SSD Optimization

Traditional hard drives (HDD) store files across physical disk platters. When files become fragmented (aka, scattered across the disk), the drive head must move between many locations to read the file, causing it naturally read files slower. Defragmentation rearranges the data so files are stored more sequentially. SSDs have no moving parts. Fragmentation does not significantly affect their performance. Because of this, Windows does not perform traditional defragmentation on SSDs. However, it does perform a different optimization called TRIM.

What TRIM Actually Does

TRIM tells the SSD which blocks of data are no longer in use. When files are deleted, Windows marks the space as free. However, the SSD itself may not immediately know that the blocks can be reused. TRIM informs the SSD controller that certain blocks are no longer needed. This helps the drive:
  • Maintain performance over time
  • Improve internal garbage collection
  • Reduce unnecessary write operations

How to Open Optimize Drives

You can open the tool using dfrgui - I know how it looks, but... Trust me? Open it from the Run dialog Win + R, type dfrgui, and hit Enter. Or search for "Defragment and Optimize Drives" in the Start menu. Windows usually runs optimization automatically on a schedule.

How It Looks When Working

Should You Run It Manually?

In most cases, no. Windows automatically schedules optimization when needed. Manual optimization is rarely necessary unless you have disabled scheduled maintenance.

What You Should Not Do

  • Do not run third-party defrag tools on SSDs.
  • Do not assume SSDs should never be optimized - TRIM is beneficial.
  • Do not disable Windows scheduled optimization without a good reason.

Final Thoughts

The Optimize Drives tool behaves differently depending on the type of storage device. Hard drives benefit from defragmentation, while SSDs benefit from TRIM operations that help maintain long-term performance.