The SSD Relapse: Understanding and Choosing the Best SSD
by Anand Lal Shimpi on August 30, 2009 12:00 AM EST- Posted in
- Storage
The Instruction That Changes (almost) Everything: TRIM
TRIM is an interesting command. It lets the SSD prioritize blocks for cleaning. In the example I used before, a block is cleaned only when the drive runs out of places to write things and has to dip into its spare area. With TRIM, if you delete a file, the OS sends a TRIM command to the drive along with the associated LBAs that are no longer needed. The TRIM command tells the drive that it can schedule those blocks for cleaning and add them to the pool of replacement blocks.
A used SSD will only have its spare area to use as a scratch pad for moving data around; on most consumer drives that’s around 7%. Take a look at this graph from a study IBM did on SSD performance:
Write Amplification vs. Spare Area, courtesy of IBM Zurich Research Laboratory
Note how dramatically write amplification goes down when you increase the percentage of spare area the drive has. In order to get down to a write amplification factor of 1 our spare area needs to be somewhere in the 10 - 30% range, depending on how much of the data on our drive is static.
Remember our pool of replacement blocks? This graph actually assumes that we have multiple pools of replacement blocks. One for frequently changing data (e.g. file tables, pagefile, other random writes) and one for static data (e.g. installed applications, data). If the SSD controller only implements a single pool of replacement blocks, the spare area requirements are much higher:
Write Amplification vs. Spare Area, courtesy of IBM Zurich Research Laboratory
We’re looking at a minimum of 30% spare area for this simpler algorithm. Some models don’t even drop down to 1.0x write amplification.
But remember, today’s consumer drives only ship with roughly 6 - 7% spare area on them. That’s under the 10% minimum even from our more sophisticated controller example. By comparison, the enterprise SSDs like Intel’s X25-E ship with more spare area - in this case 20%.
What TRIM does is help give well architected controllers like that in the X25-M more spare area. Space you’re not using on the drive, space that has been TRIMed, can now be used in the pool of replacement blocks. And as IBM’s study shows, that can go a long way to improving performance depending on your workload.
295 Comments
View All Comments
kisjoink - Monday, August 31, 2009 - link
"Intel doesn't need to touch the G1, the only thing faster than it is the G2."I've been an avid anandtech-reader since 1998, but this is the first time I'm commenting on an article. I just have to say how much I disagree with this quote!
I've used the x25m since its launch (December 08) and at first I was very happy with the drive. Although really expensive, I got convinced to buy one after reading your first previews and review. And the performance was great, at least for the first 4-5 months. At that time I started noticing some 'hiccups' (system freeze). At first they were few and short. But over time they become more noticeable and now they're a real pain. Sometimes my system can freeze for more than 15 seconds. It usually happens when I edit a picture in photoshop, but it can also happen while writing something in Word, programming java in Eclipse or just surfing the web.
The problem? I'm pretty sure its the Intel drive. After reading too many SSD-articles I immediately suspected the x25m when the I started noticing the hiccups. So I got used to running the "Windows Resource Monitor" in the background - studying the disk activity after every hiccup. Just take a look at this example (just started photoshop and did some light editing on a picture):
http://img256.imageshack.us/img256/3073/hickup.jpg">http://img256.imageshack.us/img256/3073/hickup.jpg
I'm sure there are many ways I could tune my system better. I've done a couple of things, like moved the internet temp folder to a mechanical drive etc. And the performance of the drive will probably recover if I do this special SSD-format - but it's a real pain to have to do complete OS installation 2-3 times a year when you claim it's possible for Intel to create a new firmware with TRIM-support. I mean - I really did pay premium price for this product (close to 800$ included VAT here in Norway for the 80GB version in December 08).
So, to summarise - I got convinced to buy the drive after reading your articles (you write great reviews!) - and I understand that the problem that I (and others from what I've been reading on forums) is really difficult to recreate in a testing environment - but that doesn't mean that the problem doesn't exist. I just wish you could point this out. The expensive G1 has some really big performance issues that might force you to do a complete reinstall of your system a couple times a year - and although Intel could fix it they wont, because they have a new, better and cheaper product out - and people like me (altough we feel really screwed over by Intel) will buy their next device (as long as its the best device out there).
IntelUser2000 - Monday, August 31, 2009 - link
Is that after you installed the firmware version 8820 or before?? That reduces the problem a lot unless you filled the drive to more than 70%.kisjoink - Monday, August 31, 2009 - link
Yes, I forgot to mention that - it's after I upgraded to the 8820 firmware. I don't think I've ever filled it up with more than 80%, usually I have about 30GB of free spaceAnand Lal Shimpi - Monday, August 31, 2009 - link
This is actually an interesting scenario that I've been investigating a bit myself. The 8820 firmware actually significantly changes the way the drive likes to store data compared to the original firmware. That's fine for a cleanly secure-erased drive, but what happens if you have data/fragmentation on the drive already?Every time you write to the drive the controller will look at the preferred state specified by the new firmware. It will see that your data is organized the way the old firmware liked it, but not the new firmware. Thus upon every...single...write it will try and reorganize the data until it gets to its happy state.
I honestly have no idea how long this process will take, I can see it taking quite a bit of time but perhaps you could speed it up by writing a bunch of sequential files to fill up the drive? The safer bet would be to backup, secure erase and restore onto the drive. You shouldn't see it happen again.
Think of it like this. I live in my house and I have everything organized a certain way. It takes me minimal time to find everything I need. Let's say tomorrow I leave my house and you move in. You look at how things are organized and it's quite different from how you like things setup. Whenever you go to grab a plate or book you try cleaning up a bit. Naturally it'll take a while before things get cleaned up and until then you won't be as quick as you're used to.
Take care,
Anand
jimhsu - Friday, September 11, 2009 - link
The G2's I've discovered REALLY don't like to be filled up more than 80% or so. When I had 8GB free on the 80GB drive, seq write performance basically plummeted at random intervals (to levels like 30MB/s.) Random writes sometimes dropped down to 4MB/s. Now that I've freed 20GB and tried writing and deleting large ISO files to the drive, the performance is coming back slowly.Dunk - Monday, August 31, 2009 - link
Hi Anand,I'm blown away by your article series on SSD - absolutely fantastic.
When new Intel firmware is launched with TRIM support for the G2, can I flash it without losing the drive and needing to reinstall everything?
I'm happy using the out of the box MS driver for now in Win7, but would prefer to use Intel's TRIM version once available.
Many thanks
Duncan
Anand Lal Shimpi - Monday, August 31, 2009 - link
If Intel follows the same pattern as what we saw with the G1's firmware update, you should be able to flash without destroying your data (although it's always a good idea to back up).Thank you for your comment :)
Take care,
Anand
mgrmgr - Monday, August 31, 2009 - link
Okay, single X25-M G2s can be updated without losing data. But I am considering two 80GB drives in RAID-0 to overcome the sequential write slowdown with Photoshop. How will updating work for the RAID-0 pair?Do you have an opinion about using a RAID pair for Photoshop?
Noteleet - Monday, August 31, 2009 - link
Fantastic article, I'm definitely planning on getting a SSD next time I upgrade.I'm fairly interested in seeing some reviews for the Solid 2. If OCZ can get the kinks worked out I think the Intel flash and the Indilinx controller would make a winning combination for price to performance.
Visual - Monday, August 31, 2009 - link
Where does the drive store the mapping between logical and physical pages and other system data it needs to operate? Does it use the same memory where user data is stored? If so, doesn't it need to write-balance that map data as well? And if that's true, doesn't it need to have a map for the map written somewhere? How is that circular logic broken?Or does the drive have some small amount of higher-quality, more reliable, maybe single-level-cell based flash memory for its system data?