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


View All Comments

  • mbreitba - Tuesday, October 27, 2009 - link

    Looks like a lot of people are having problems with it, and Intel has pulled it :


  • Griswold - Wednesday, October 28, 2009 - link

    If you actually look at the number of people with the issue and filter out the chit-chat, its not "alot" actually. However, my flash went just fine.

    Thats the risk with flashing firmware regardless of what device it is. Theres always the chance to brick it. Thats also why I dont understand why some people flash every fucking piece of hardware whenever theres a new firmware available - ok, this is a different case, here it makes perfectly sense.
  • strikeback03 - Wednesday, October 28, 2009 - link

    Has anyone had problems flashing a drive before they put any data on it? I have a new G2 still in the box that I just haven't yet had time to do anything with, was planning on flashing it then loading Win7 and Ubuntu 9.10 this weekend, have there been any reports of issues when loading an OS after flashing? Reply
  • UltraWide - Tuesday, October 27, 2009 - link

    Great article, I like the definite conclusions and recommendations. Keep up the good work! Reply
  • nicolasv - Tuesday, October 27, 2009 - link

    Hi Anand

    In 'The SSD Relapse' you state that the G2 "doesn't drop in performance when used...at all." Yet in 'The SSD Improv' the 80GB G2 with TRIM firmware drops more than 60% in the 4KB random write test.

    Granted, the charts and figures used in 'Relapse' to back its claim are for the 160GB G2 and these results are for the 80GB G2. What do you attribute this difference in performance to, the new TRIM firmware?

    As a Mac OS X user, at this point, I feel like I can only really consider drives that perform well without TRIM, especially in the <= 80GB range, so would appreciate your feedback.

  • 7Enigma - Tuesday, October 27, 2009 - link

    I believe it is because in that particular test he is writing to the ENTIRE 80gig drive, so it's not that TRIM isn't working per se, rather that there is no free space to allow TRIM to do anything at all. Reply
  • 7Enigma - Tuesday, October 27, 2009 - link

    As an addendum to my previous post, you can see that after file deletion the performance goes back to virtually new. So in a sense the performance of the drive never goes down, UNLESS you simply delete a partition rather than erasing the data on that partition FIRST and then deleting it.

    I think that's probably something that needs to be implemented with an updated driver, or at least a warning box that comes up saying "deleting this partition without formatting will hinder performance".
  • GullLars - Tuesday, October 27, 2009 - link

    I don't know if you have done extensive benchmarking with SSDs, but using IO QD = 3 for 4KB random in IOmeter don't yield representative results for intels SSDs. I have been benchmarking SSDs with some other guys for over a year now, and we have found that while Samsung and Indilinx scale from QD 1-4 and then flat out, Intels x25-M scales well all the way to around QD 10-16, and actually is capable of over 140 MB/s at 4KB random read at QD=64 in fresh state, and still over double your messured 60-64 MB/s in used state.

    In our benchmark thread, the records with x25-M from ICH10R before TRIM firmware are:
    4KB random read QD=64: 40913 IOPS = 163,5 MB/s
    4KB random write QD=64: 19360 IOPS = 77 MB/s
    PCmark vantage HDD score: 43107.

    The same guy that got the random read and PCmark scores above also got PCmark vantage HDD score 120374 with 3 x25-M gen1 from ICH10R.

    In other words, the results posted for x25-M in this review are either in "used state" or below par.
  • Voo - Tuesday, October 27, 2009 - link

    You know Anand trys to simulate REAL situations and a QD of 10-16 is absolutly unrealistic for a home user - don't even talk about a QD of 64. Maybe the Intel SSDs shine there, but it's just of no interest. Reply
  • GullLars - Tuesday, October 27, 2009 - link

    In his traced "light" benchmark with mostly single-tasking the average queue depth is 6.09. If you take into account that most of the sequential read and write operations (although they are under 30%) don't generate a queue, and that 4-16KB IOs often come in bursts with more queue depth, you can easily get a QD of more than 10 with relatively mild multitasking if it involves disk access. A harddisk's cache is regulary used as a buffer for the write portion of these, but if the cache is full your system almost freezes because of the harddisks low IOPS. An example would be if you try installing windows updates or a program while running a virus scan and listening to music or extracting a compressed archive, you will quickly notice if you try this on a harddisk. Reply

Log in

Don't have an account? Sign up now