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
POST A COMMENT

163 Comments

View All Comments

  • mrt2 - Monday, November 23, 2009 - link

    Ok so with all this new data in mind, what's currently the fastest, least performance degrading 256GB SSD you can get for under $1000? I'm currently running Snow Leopard on a dual quad core Mac Pro... I'm not sure Snow Leopard supports any of the new technologies like TRIM or not... but whatever the best 256GB SSD I can get, that's what I'd like.... Reply
  • rdhir - Wednesday, November 18, 2009 - link

    WARNING on Intel Matrix drivers

    I just wanted to add a word of warning over drivers and SSD. I just built a new i5 750/P55 system with a Corsair X64 drive (Indilinx). While the system worked fine in bits it frequently froze. I tried lots of things to cure it, but in the end the fix was simple. I HAD to use the Intel drivers to avoid intermittent freezing.

    Because I had made the SSD the C:drive and used a 1TB Samsung F2 as the D: drive, I had not wanted to lose TRIM support, until the new AHCI drivers came out, but MS drivers don't work. reference article is here http://derek858.blogspot.com/2009/01/windows-7-int...">http://derek858.blogspot.com/2009/01/windows-7-int...

    Reading around some of the othere references Its inconsistent and depends on how the drives implements the command set so your mileage may vary but I think its a big issue.

    I think we could all do with an article on how best to configure an SSD based system. I decided that I wanted to move "Users" and all associated hidden directories to the D: drive (a 1TB HD) leaving the 64GB for Windows and Apps. This would mean it would never get too full.

    I'm amazed at how difficult Microsoft make it to shift the "Users" directory to another drive. In fact they have a Knowledge base article saying not to - Linux easy, just map /home elsewhere.

    In the end I followed some instructions to create a junction from C:\Users to D:\Users, but its non-trivial and involves opening a command window in the middle of the installation process.

    Yes I'd like to have done it with an autounattend.txt but the MS KB articles says it won't really work.
    Reply
  • mapesdhs - Thursday, November 19, 2009 - link


    > In the end I followed some instructions to create a junction from
    > C:\Users to D:\Users, but its non-trivial and involves opening a
    > command window in the middle of the installation process.

    I can't see this sort of thing becoming any easier until MS ditches
    the archaic idea of drive letters and switches to a more natural
    unified file system such as is used with all UNIX OS variants.

    (oh look, the pits of hell seem to be getting a tad icey...)

    Ian.

    Reply
  • MadAd - Thursday, November 19, 2009 - link

    "I think we could all do with an article on how best to configure an SSD based system"


    That would be great
    Reply
  • CuriousMike - Monday, November 23, 2009 - link

    " "I think we could all do with an article on how best to configure an SSD based system"


    "That would be great " "

    Thirded.

    The variety of do's and don'ts (and conflictions) are numerous:
    -do disable pagefile. don't. oh, which OS?
    -don't defrag disk. do. oh, which OS?
    -use ram disk for temp files. don't. no, wait, do.
    Reply
  • ol1bit - Wednesday, November 18, 2009 - link

    I can't believe they don't have firmware for my drive to trim it... I just bought the sucker 3 months ago.....

    Intel X25-M SSDSA2MH080G1 80GB SATA II MLC Internal Solid state disk (SSD)
    Reply
  • dagamer34 - Wednesday, November 18, 2009 - link

    No TRIM for G1 drives. Sorry. Reply
  • yacoub - Tuesday, November 17, 2009 - link

    An old article reposted as new simply because of a couple-sentence-long update? Interesting.

    Also, $85? No, try $130 and no MIR. Thanks ScrewEgg!
    http://www.newegg.com/Product/Product.aspx?Item=N8...">http://www.newegg.com/Product/Product.a...pk=kings...
    Reply
  • 7Enigma - Tuesday, November 17, 2009 - link

    If the only update was the 2 short blurbs at the top of the first page I don't think this entire article should be reposted. A simple statement with a link to the previous article would be fine. I just wasted a couple minutes going through each page realizing nothing was new....not cool. I was psyched for another SSD article Anand! Reply
  • max22 - Tuesday, November 17, 2009 - link

    I installed Intel's pulled firmware fine on my G2 drives. Nothing happen to them at all. I think the whole issue has been blown way over the top. Reply

Log in

Don't have an account? Sign up now