Wipe When You Can’t TRIM

There’s a major problem with TRIM today. The only Windows storage drivers to support it are written by Microsoft. The Intel Matrix Storage Manager (IMSM) driver will not pass the TRIM instruction to your SSD. This means you can't use anything but the drivers that ship with Windows 7. To make matters worse, if you enable non-member RAID on an Intel motherboard the default Windows 7 driver is an older version of IMSM so TRIM won't work there either - even if you don't have a RAID array created. Your best bet is to install Windows 7 with your I/O controller in AHCI mode (for Intel chipsets) and don't install any storage drivers. Intel is working on an updated IMSM that will pass the TRIM instruction to SSDs but it won't be ready for at least a couple of months.

TRIM won't work on a RAID array.

If you want to use IMSM or if you're using Windows XP or Vista, both of which do not support TRIM, there's another option. Earlier this year Indilinx released its Wiper Tool that performs a manual TRIM on their SSDs. It works by asking the OS for a list of the free space addresses on the partition and then sending the list with instructions to TRIM down to the SSD.


The Indilinx Wiper Tool

Today Intel introduces its own manual TRIM tool as a part of the SSD Toolbox:

On any Windows OS (XP, Vista or 7) regardless of what driver you have installed, Intel's SSD Toolbox will allow you to manually TRIM your drive. Intel calls it the SSD Optimizer, which of course only works on 34nm Intel SSDs (X25-M G1 owners are out of luck unfortunately).


The Intel SSD Optimizer lets you schedule the manual TRIM operation automatically

The SSD Toolbox also gives you access to SMART and drive health data, including telling you how many writes you've performed on your SSD, and what your current flash wear level is:

Running Intel's SSD Optimizer does work as advertised. I ran the PCMark HDD suite on a clean X25-M, once more on a drive that had been well used and once more after running the SSD Optimizer:

PCMark Vantage HDD Score Clean Run Used Run After SSD Optimizer
Intel X25-M G2 160GB 35909 30354 34014

 

Intel's SSD Optimizer should be able to restore performance to about 95%+ of new, in this case it manages 94.7% - close enough.

Moving On: Forget About Invalid Data and Worry About Free Space

The existence of TRIM changes the way we test, something I alluded to in the SSD Relapse. Thankfully, we come prepared.

In previous articles we had to test SSDs in two conditions: new and used. The new state is just after a secure erase, the used state required us to write data to every user accessible portion of the drive first before benchmarking. The former resulted in great performance, the latter meant the SSD had to do a lot of juggling of existing data whenever it went to write. The second scenario no longer exists with TRIM. The act of formatting your drive or deleting files (and emptying the recycle bin) will TRIM invalid data.

Performance in a TRIM enabled system is now determined not by the number of invalid blocks on your SSD, but rather the amount of free space you have. I went into a deep explanation of the relationship between free space and the performance of some SSDs here.

TRIM will make sure that you don’t have to worry about your drive filling up with invalid data, but it doesn’t skirt the bigger issue: dynamic controllers see their performance improve with more free space.

My rule of thumb is to keep at least 20% free space on your drive, you can get by with less but performance tends to suffer. It doesn’t degrade by the same amount for all drives either. Some controllers are more opportunistic with free space (e.g. Intel), while others don’t seem to rely as much on free space for improved performance. Addressing performance degradation as drives fill up (with valid data) will be one of the next major advancements in SSD technology.

Testing TRIM Kingston Delivers the First Good Sub-$100 SSD (after Rebate)
Comments Locked

162 Comments

View All Comments

  • Pandamonium - Monday, October 26, 2009 - link

    The 2nd gen X18-M isn't available as far as I can tell. It kind of shafts us tablet and ultraportable users out of the SSD market for another round =/
  • Cavicchi - Monday, October 26, 2009 - link

    "You no longer have to boot to DOS and secure erase your SSD before installing Windows, just quick format the partition before installing Windows 7."

    I always thought the "quick format" doesn't wipe the entire drive as clean as a full/long format. Does the above mean we only need to do a quick format to wipe a drive clean to install Windows 7?

    Also, I noticed Superfetch, Prefetch, and Ready Boost are enabled in Windows 7 x64 with my X25-M G2 160GB drive installed.
  • Voo - Monday, October 26, 2009 - link

    Logically when a TRIM command is sent to the drive you lose all the data that was saved there.

    So, there's no difference between full/quick format or anything else as long as it triggers the TRIM command..
  • Beno - Monday, October 26, 2009 - link

    "SSDs are made up of millions of NAND flash cells. They can be written to in groups called pages (generally 4KB in size) but can only be erased in larger groups called blocks (generally 128 pages or 512KB). These stipulations are partially the source of many SSD performance issues."
    but isnt it possible to erase data in 4KB, the same way they are written?
  • krumme - Monday, October 26, 2009 - link

    Where does speed matter most?
    Getting some sense into the g2 hype
    Now you can have a job with a Dell and a hd with samsung controller without quitting the job

    Thanx Anand for always improving your site and letting us learn
    Thats whats move this boys-toy business forward


  • flynace - Monday, October 26, 2009 - link

    If you set up a software RAID-0 array within Windows 7 will it support TRIM?
    Or is TRIM not possible on any form of RAID (OS, BIOS, HW, etc.)?

    And does aliging the partitions make any difference on these drives?
  • Voo - Monday, October 26, 2009 - link

    Iirc Anand stated in some of his articles that there's no TRIM support for raid, because the controller had to forward the commands.

    But imho it sounds not like a unconquerable problem, so it's probably only a question of time.
  • flynace - Tuesday, October 27, 2009 - link

    Thanks. I assume Intel will update their drivers to support RAID TRIM eventually, but if you don't have an 'R' tybe Intel ICH, does Win7 support TRIM if you set up a software RAID array in the OS still using the MS AHCI drivers?
  • Willardjuice - Monday, October 26, 2009 - link

    Did Intel update their Windows 7 sata/raid drivers to also include TRIM support? Or do we have to use the drivers provided by Microsoft?
  • DoveOfTheSouth - Monday, October 26, 2009 - link

    Another great SSD article from Anand (thank you so much)!

    But I'm really disappointed that you have to use the Microsoft Win 7 disk driver to get TRIM. It has a huge problem.

    Based on my experience, I would normally strongly recommend that the first thing you do when installing Win 7 is replace the Microsoft driver with the latest Intel Matrix Storage Manager.

    The following link describes the problem (long periods of system non-responsiveness) you can get with the Microsoft driver and at least some PCs, and how to fix it:
    http://blogs.zdnet.com/Bott/?p=1431&page=3&...">http://blogs.zdnet.com/Bott/?p=1431&page=3&...

    I had exactly the same crippling problem on a Dell Dimension 9100 which baffled me until I replaced the Microsoft driver with IMSM - problem disappeared instantly.

    Okay it was bit of an old PC but of the 3 I have been testing with Win 7 for the last couple of months, it was the only one that used the Microsoft driver instead of IMSM (it was an XP upgrade ie OS reinstall, the others upgrades from Vista). So I don't know how widespread the problem with the Microsoft driver is, it hit my only PC that was a candidate, but I'd be pretty wary.
    Otherwise Win 7 has been great.

    So it looks like you have a choice: IMSM with no TRIM or a buggy Microsoft driver with TRIM.

Log in

Don't have an account? Sign up now