Testing TRIM

A firmware update gives you TRIM support, but we should probably test to make sure it's actually working.

First up, the Intel X25-M G2 with the TRIM firmware. I ran a 4KB random write test across the entire 80GB LBA space for five minutes. I ran the test again afterwards and recorded the average transfer rate for each run:

4KB Random Write, IOQ=16 Run 1 Run 2
Intel X25-M 80GB TRIM Firmware 37.9 MB/s 13.8 MB/s

 

As expected, performance goes down as the drive fills up. The second run is much slower than the first.

Now look at the two runs if we format the drive in between. The format under Windows 7 triggers a TRIM of all invalid data, meaning all the jibberish we generated in the first run is gone and the second run now runs at full speed:

4KB Random Write, IOQ=16 Run 1 Run 2 after Format
Intel X25-M 80GB TRIM Firmware 37.9 MB/s 38.0 MB/s

 

Obviously you don’t usually write a bunch of garbage to your drive then format and repeat, but we’re trying to confirm that TRIM works here; it does. Windows 7 will actually take noticeably longer to format a drive that supports TRIM and has data on it. It still completes in less than 30 seconds on these SSDs, but it's a lot longer than the few seconds it used to take before TRIM.

This confirms that TRIM works on a format, but what about if you delete a partition? To find out I created a partition on my X25-M G2, filled it with data, deleted the partition and ran my 4KB random write test across all LBAs. If deleting a partition forces TRIM I should see new-performance out of the G2:

4KB Random Write, IOQ=16 Run 1 Run 2 after Deleting Partition
Intel X25-M 80GB TRIM Firmware 37.9 MB/s 17.9 MB/s

 

Performance drop. Formatting a partition causes the contents to be TRIMed, but just deleting a partition doesn’t. This means if you accidentally delete a partition you can still retrieve your data, however there’s no way to go back from a format.

What about file deletion? I performed the same test. Created a partition, filled it with garbage but then deleted the garbage before deleting the partition and running my 4KB random write test. Deleting data should force a TRIM:

4KB Random Write, IOQ=16 Run 1 Run 2 after Deleting All Files
Intel X25-M 80GB TRIM Firmware 37.9 MB/s 40.4 MB/s

 

Indeed it does. You no longer have to worry about performance dropping over time. When you delete a file it’ll eventually be nixed on the SSD as well. Below we have the actions that will force a TRIM of data under Windows 7:

Windows 7 File Delete Partition Format Partition Delete
TRIM? Yes Yes No

 

Formatting your drive now actually does something. 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 performed the same tests on an Indilinx MLC based SSD, this time a SuperTalent UltraDrive GX with the 1819 TRIM-enabled firmware. The results were identical:

4KB Random Write, IOQ=16 Run 1 Run 2 After Format After File Delete
SuperTalent (Indilinx) UltraDrive GX TRIM Firmware v1819 17.8 MB/s 14.1 MB/s 17.8 MB/s 17.8 MB/s

 

We have TRIM working on both Indilinx (from SuperTalent/OCZ) and Intel drives. Sweet.

Index Wipe When You Can’t TRIM
Comments Locked

162 Comments

View All Comments

  • EasterEEL - Monday, October 26, 2009 - link

    Once the Intel firmware is updated to v1.4 with trim support does Windows 7 start using trim? i.e I have already installed Windows 7 before dong the firmware update.

    Does ghosting an image back to the SSD have any impact on trim??
  • magreen - Monday, October 26, 2009 - link

    That Kingston for $85 is looking tempting for sprucing up a circa-2004 laptop of mine that I use daily. But the laptop is ide. I know of others in the same boat.
    Have you heard of anyone producing an inexpensive quality ssd for ide? The Kingston seems like the perfect candidate since it's anyways not as fast as the regular Intels.
  • Zoomer - Monday, October 26, 2009 - link

    Make sure that the drive interfaces match. If it's from 2004, it might still be PATA. I'd imagine this is SATA only.

    That said, it'll be interesting to see if soldering more flash chips on = upgrade in space. Shouldn't be too hard to find the flash chips (2 * Kingstons < Intel), but I'll need to find a good soldering jock.
  • magreen - Thursday, October 29, 2009 - link

    Ummmm... maybe I wasn't making myself clear.
    I wasn't referring to upgrading the drive's capacity.
    I was referring to Kingston producing a PATA drive that would work with my PATA laptop. I know PATA doesn't work with SATA. (I loosely referred to PATA as IDE, which people often do...)
    thanx
  • IMFTbestFab - Monday, October 26, 2009 - link

    You can't upgrade capacity like this. The drive has a maximum LBA associated with it, presumably set at the factory.
  • Eeqmcsq - Monday, October 26, 2009 - link

    Another great SSD article, Anand. Found a problem: Page 3, "Wipe When You Can’t TRIM", when you said "I went into a deep explanation of the relationship between free space and the performance of some SSDs here.", it sounds like there should be a link to a previously written article, but there is no link.
  • ekbond - Monday, October 26, 2009 - link

    Any thoughts on TRIM support in OS X?

    The download page for Intel's SSD utility specifies that it's OS independent, while the user guide says Windows is required.

    Apart from formatting the drive, are there any other ways to restore performance (via TRIM or otherwise) currently available to OS X users?
  • Anand Lal Shimpi - Monday, October 26, 2009 - link

    OS X doesn't have TRIM support yet unfortunately. I'm trying to get Apple to at least acknowledge that they will be supporting the feature but haven't had any luck yet. I haven't tried some of the erase options in Disk Utility to see if they do the equivalent of a secure erase. I'll try barking up that tree shortly.

    Take care,
    Anand
  • chizow - Monday, October 26, 2009 - link

    Newegg will just gouge the crap out of prices regardless. $100-130 will be more like $150-180. Remember when you said Intel would be dropping SSD prices with the G2 to $230 and $450 for the 80g and 160g respectively?

    http://www.newegg.com/Product/ProductList.aspx?Sub...">http://www.newegg.com/Product/ProductLi...scriptio...

    They were sub $250 for about 12 hours total since Newegg got them in stock 2 months ago after the initial "recall".

  • strikeback03 - Tuesday, October 27, 2009 - link

    I picked up my 80GB G2 a couple weeks ago from Newegg for $239 shipped, for the retail boxed one; the deal also included a Icy Dock 2.5" to 3.5" adapter and a ThermalTake Element S case for $30 with a $30 MIR.

Log in

Don't have an account? Sign up now