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

  • Voo - Tuesday, October 27, 2009 - link

    Ok I was a bit surprised and tried it myself with my 160gb Intel G2 (no firmware update yet)


    Copy 10gb file onto drive, MSE full scan and extracting a 4gb file with 7z while the usual stuff (FF, PS, eclipse and winamp) running in the backgorund and I got a maximum QD of under 8, which is higher than I expected it to be, but still far away from a QD of 16.
    And when doing more multitasking stuff I'd probably tax the rest of the system more than the SSD so at least for my usual behavior a QD >8 is unrealistic, but I see your point.

    There are probably some people who could get a QD of 10-12 in a normal workload, so that could be interesting for them :)
  • GullLars - Wednesday, October 28, 2009 - link

    There is a big difference between average queue and queue during operations. The IO queues are relatively low for all the background operation the OS does, and sequensial read/write, but when you do things like open administrative tools, open a program, or install something, you will se queue spikes of easily 50-60.
    After i commented this article i had a discussion with some other benchmarkers, and we found that normal use generates IO queue spikes almost whenever you interact with the OS. It doesn't take much effort to generate a queue above 100. Running a couple of virus scans on folders of small files while installing a program and opening a folder with lots of pictures will get you a massive queue.
  • NeBlackCat - Tuesday, October 27, 2009 - link

    Nice work again Anand - I just don't bother reading SSD reviews/features on other sites any more.

    HOWEVER...

    Many people reading this will be developers wondering which controller best favours typical development activities, eg. checking out and compiling large projects. It's a hard one to guess - lots of random reading, sequential reading, random writing (temp files) and sequential writing (output files).

    So how about a "typical developer" benchmark of, say, compiling the Linux kernel while concurrently encoding some H.264, grepping all the sources for a string, and watching some por..er, I mean, youtube.

    Has anyone else evaluated the best SSD type for s/w development?




  • clarkn0va - Wednesday, October 28, 2009 - link

    Not a reply to your question, but I've taken on the habit of mounting my temp files to a ramdisk. Besides the speed improvement, this should help to reduce unnecessary write cycles to the SSD. Similarly, I run without swap (or page file), RAM being as affordable as it is.
  • lamo - Tuesday, October 27, 2009 - link

    TRIM support aside, I wonder how would a pair of $85 Kingston drives in a RAID 0 striped array compare against a $225 X-25M dollar/performance-wise.

  • cosminliteanu - Monday, October 26, 2009 - link

    So - "Your best bet is to install Windows 7 with your I/O controller in AHCI mode (for Intel chipsets)" this means you set in BIOS sata controller as AHCI not as IDE ?????
    Or just leave as IDE and after Win7 install, update intel storage driver as normal...? which is the best solution?
  • LuMax - Monday, October 26, 2009 - link

    Can I use Intel IMSM RAID on just the data storage drives in my PC and retain TRIM functionality on the W7 Pro OS (X-25M G2) SSD?

    My new PC build plan was to use a single 80GB G2 for the OS and programs and two 2TB HDDs in a RAID1 array for my data/photo/video/music storage. Although I read the relevant part of this article 3 times I am still not certain if this is doable. Yes/No?
  • LuMax - Tuesday, October 27, 2009 - link

    I heard back from Intel today:

    "Thank you for contacting Intel Technical Support.

    I understand your question about the Intel(R) Matrix Storage Manager and the SSD. Since the drives you will be using in RAID are non-solid state disks, and the SSD you will be using will not be part of the RAID, there should not be any problem with TRIM."
  • somedude1234 - Tuesday, October 27, 2009 - link

    I would not expect this to be possible. It sounds like you have 3 drives hanging off of the same SATA controller. You want 2 of them in RAID 1 using the IMSM driver, and one of them using the MS driver.

    In my experience it would be impossible to get Windows to load 2 different drivers for different ports on the same controller.

    Even if they were physically independent but identical controllers (for example if you had 2 identical SAS cards plugged into the same system), as soon as you update the driver on one controller, a reboot results in all instances of that controller using the updated driver.
  • DoveOfTheSouth - Monday, October 26, 2009 - link

    I'd like to know this too.
    I'm considering a similar set-up (SSD for systems drive, RAID for data storage HDD) - seems best of both worlds.

Log in

Don't have an account? Sign up now