Testing TRIM

SSDs by default have no knowledge of what locations in NAND contain valid or invalid data. All writes are committed to NAND and it's not until an LBA is overwritten that the controller gets rid of the data previously at that address. Well designed controllers thrive with as much free space as possible, but without knowing what NAND blocks contain valid data the amount of free space on a drive from the controller's perspective diminishes over time. This results in the oh-so-familiar performance degradation over time that plagues all SSDs. The ATA TRIM command was introduced to help alleviate this issue. In a supported OS with TRIM enabled drivers, whenever data is deleted a command is sent to the SSD to TRIM the LBAs that map to the now invalid data. Upon receiving this command, modern SSDs mark those NAND blocks as invalid and schedule them for recycling. In the end this helps performance remain high over time.

Note that TRIM doesn't solve all fragmentation - you need a good controller with well architected firmware to ensure that fragmentation doesn't become an out of control problem. To understand how the m4's TRIM implementation performs let's first look at its fresh, out-of-box sequential write speed:

Note the relatively consistent write performance averaging 250MB/s. Now let's put the drive in a horribly fragmented state by first writing to all user addressable LBAs sequentially then performing a 4KB random write test at a queue depth of 32 across the entire drive for 20 minutes. This is what a sequential pass looks like after our little torture session:

Note the remarkable falloff in performance. Most of this is due to just how fast the m4 can write 4KB of data randomly across the drive, but it also shows that Crucial manages to reach such high 4KB random write speeds by not adequately combating fragmentation on the fly. Thankfully the drive does seem to recover pretty well, here's what it looks like after a second sequential pass:

Finally if we format the entire drive we get to see how well the m4 responds to the ATA TRIM command. To avoid giving the m4 an easier time I secure erased the drive, re-ran our torture test without the second pass (above) and then TRIMed its contents to produce the graph below:

Performance is back to new. What does all of this tell us? If you're running an OS with TRIM support you'll likely be just fine with the m4. Pseudo-random writes are common within any desktop workload, but if you avoid filling your drive to capacity and have a TRIM supported OS the drive shouldn't get into a bad state. The bigger concern is running the m4 in an OS without official TRIM support (e.g. Mac OS X) where you could find yourself in a particularly bad situation over a long period of time. Even then, it's obvious that sequential write passes over used LBAs cleans the drive up fairly well. Chances are that a standard desktop workload in a TRIM-free OS would be fine over the long run. If not, some sequential writes to any free space would do the trick (e.g. copying a large video file then deleting it).

AnandTech Storage Bench 2011 - Light Workload Final Words
Comments Locked

45 Comments

View All Comments

  • iwod - Wednesday, August 31, 2011 - link

    I am one of the few,( or many ) who don't want a Sandforce based SSD and cant afford the Intel SSD. Crucial provides a very good balance SSD for a competitive price with m4. And the 0009 Firmware just sweeten the deal.
  • landerf - Wednesday, August 31, 2011 - link

    This drive has on a few occasions, and as recently as yesterday, had 15% codes at newegg. I got mine for $350 with one, and for a few days there you could get it as low as $333. Nuts deal for a drive that not only offers more usable space but none of that random BSOD shit you get with SF. Wait for another 15% off code, grab one, profit.
  • Marlin1975 - Wednesday, August 31, 2011 - link

    You always use intel for testing SSDs. How about compare a 950southbridge SATA 6gb to a Z68 Intel SATA 6gb?
  • dac7nco - Wednesday, August 31, 2011 - link

    That might be interesting; From what I've seen from some reviews, AMD's chipsets have improved their SATA-III throughput to a near-parity with Intel's... I don't remember specifics about random I/O.

    Daimon
  • zsero - Wednesday, August 31, 2011 - link

    What is the Kingston HyperX drive in this test? Is it just me, who missed it? It is faster than EVERYTHING else, yet not a single article about it?
  • DanNeely - Wednesday, August 31, 2011 - link

    It's the representative SF-2281 SSD. Presumably it didn't get a full article because another SF2281 with identical flash chips had already been reviewed.

    http://www.anandtech.com/show/4390/kingstons-hyper...
  • Holly - Wednesday, August 31, 2011 - link

    Running Vertex 3 on P67 chipset (ASUS board)... since firmware 09 release I had two hard locks requiring shut down computer (disconnect from UPS, wait, reconnect, run)... so the situation was much better... instead of few locks a day to one per month... given the machine runs 24/7.
    Installed firmware 11 today, curious if it solves the issue completely.
    Other than that starting visual studio 2010 and opening project below 2 secs is just epic. Though as long as my machine runs without issues for 3 monts at least, I can't recommend the drive to any customer or friend.
  • gamoniac - Wednesday, August 31, 2011 - link

    I saw on newegg that Crucial m4 SSD 128Gb is on newegg's Shell Shocker today, in case you plan on buying one.
  • Nakecat - Wednesday, August 31, 2011 - link

    I been doing some research regarding of C300 TRIM with RAID 0 or RAID 5, most of the answer i found are tell ing me that TRIM doesn't work in RAID Array even with TRIM OS. Is this true?
  • MarkLuvsCS - Wednesday, August 31, 2011 - link

    TRIM commands cannot be passed to a raid array. TRIM can be passed to drives on systems that have an nonraided SSD alongside raided standard drives (this has only happened a few months ago).

    Some drives do not require trim because they have an internal garbage collection built into the firmware such as the sandforce drives. Although Crucial has garbage collection as well, it does not occur aggressively to recover if the drive performance gets murdered by random writes. It WILL eventually recover its performance but TRIM makes sure this is never a problem.

    Sandforce seems the only way to go for RAIDed drives but I would say you're better off buying a larger SSD to begin with to avoid these problems.

Log in

Don't have an account? Sign up now