Steve Smith's Blog

Musings on Software and the Developer Community

How to set up TRIM with Win7 and SSD Drive

I have an Intel X-25M SSD in my developer workstation machine (and it’s quite fast).  However, I’ve heard from others that over time SSD performance can degrade due to sub-block level fragmentation that occurs as a result of write combining.  Fortunately, newer SSD drives (like mine) support the TRIM command, but of course this only works if your system is sending the command to the drive.

How Do I Know if Windows is Using TRIM for my SSD?

Fortunately (and thanks to Ken), there is a simple command you can execute to determine if windows is sending TRIM commands to your SSD drive.

image

Run the following command:

fsutil behavior query disabledeletenotify

If the result is 0, then Windows is sending TRIM commands to the device (which obviously needs to have firmware that supports TRIM for this to matter).

    kick it on DotNetKicks.com

Monday, 01 February 2010

Comments

 avatar

Carl said on 01 Feb 2010 at 1:55 PM

Thanks! bookmarked for future use -- whenever I get around to building that uber-performant silent pc.


 avatar

Michael K. Campbell said on 01 Feb 2010 at 2:09 PM

Great reference Steve.

And for anyone with SSDs in a RAID, just note however that DisableDeleteNotify will LIKELY still return 0, but you won't be getting the TRIM love/happiness that you need and you'll pull your RAID apart to get it 'cleaned' every once in a while.


 avatar

Brad Kingsley said on 01 Feb 2010 at 2:23 PM

Has anyone gotten a response other than 0? I've gotten zero on each of my tests. Maybe I'm just lucky and it's running on my Win7 systems by default, or maybe it doesn't report as expected - ?


Leave a Comment

Please join the discussion and share your thoughts.