Putting Theory to Practice: Understanding the SSD Performance Degradation Problem

Let’s look at the problem in the real world. You, me and our best friend have decided to start making SSDs. We buy up some NAND-flash and build a controller. The table below summarizes our drive’s characteristics:

  Our Hypothetical SSD
Page Size 4KB
Block Size 5 Pages (20KB)
Drive Size 1 Block (20KB
Read Speed 2 KB/s
Write Speed 1 KB/s

 

Through impressive marketing and your incredibly good looks we sell a drive. Our customer first goes to save a 4KB text file to his brand new SSD. The request comes down to our controller, which finds that all pages are empty, and allocates the first page to this text file.


Our SSD. The yellow boxes are empty pages

The user then goes and saves an 8KB JPEG. The request, once again, comes down to our controller, and fills the next two pages with the image.


The picture is 8KB and thus occupies two pages, which are thankfully empty

The OS reports that 60% of our drive is now full, which it is. Three of the five open pages are occupied with data and the remaining two pages are empty.

Now let’s say that the user goes back and deletes that original text file. This request doesn’t ever reach our controller, as far as our controller is concerned we’ve got three valid and two empty pages.

For our final write, the user wants to save a 12KB JPEG, that requires three 4KB pages to store. The OS knows that the first LBA, the one allocated to the 4KB text file, can be overwritten; so it tells our controller to overwrite that LBA as well as store the last 8KB of the image in our last available LBAs.

Now we have a problem once these requests get to our SSD controller. We’ve got three pages worth of write requests incoming, but only two pages free. Remember that the OS knows we have 12KB free, but on the drive only 8KB is actually free, 4KB is in use by an invalid page. We need to erase that page in order to complete the write request.


Uhoh, problem. We don't have enough empty pages.

Remember back to Flash 101, even though we have to erase just one page we can’t; you can’t erase pages, only blocks. We have to erase all of our data just to get rid of the invalid page, then write it all back again.

To do so we first read the entire block back into memory somewhere; if we’ve got a good controller we’ll just read it into an on-die cache (steps 1 and 2 below), if not hopefully there’s some off-die memory we can use as a scratch pad. With the block read, we can modify it, remove the invalid page and replace it with good data (steps 3 and 4). But we’ve only done that in memory somewhere, now we need to write it to flash. Since we’ve got all of our data in memory, we can erase the entire block in flash and write the new block (step 5).

Now let’s think about what’s just happened. As far as the OS is concerned we needed to write 12KB of data and it got written. Our SSD controller knows what really transpired however. In order to write that 12KB of data we had to first read 12KB then write an entire block, or 20KB.

Our SSD is quite slow, it can only write at 1KB/s and read at 2KB/s. Writing 12KB should have taken 12 seconds but since we had to read 12KB and then write 20KB the whole operation now took 26 seconds.

To the end user it would look like our write speed dropped from 1KB/s to 0.46KB/s, since it took us 26 seconds to write 12KB.

Are things starting to make sense now? This is why the Intel X25-M and other SSDs get slower the more you use them, and it’s also why the write speeds drop the most while the read speeds stay about the same. When writing to an empty page the SSD can write very quickly, but when writing to a page that already has data in it there’s additional overhead that must be dealt with thus reducing the write speeds.

The Blind SSD Free Space to the Rescue
Comments Locked

250 Comments

View All Comments

  • strikeback03 - Thursday, March 19, 2009 - link

    I understand your point, but I am not sure you understand the point I (and others) are trying to make. The SSD makers (should) know their market. As they seem to be marketing these SSDs to consumers, they should know that means the vast majority are on Vista or OSX, so the OS won't be optimized for SSDs. It also means the majority will be using integrated disk controllers. Therefore, in choosing a SSD controller which does not operate properly given those restrictions, they chose poorly. The testing here at Anandtech shows that regardless of how the drives might perform in ideal circumstances, they have noticeable issues when used the way most users would use them, which is really all those users care about.
  • tshen83 - Thursday, March 19, 2009 - link

    In the history of computing, it was always the case that software compensated for the new hardware, not the other way around. When new hardware comes out that obsoletes current generation of software, new software will be written to take advantage of the new hardware.
    Think of it this way: you always write newer version of drivers to drive the newest GPUs. When is the last time newer GPUs work with older drivers?

    Nobody should be designing hardware now that makes DOS run fast right? All file systems (except ZFS and soon BTRFS) are obsolete now for SSDs, so we write new file systems. I am not sure Intel X25-M's approach of virtualizing flash to the likings of NTFS and EXT3 is the correct one. It is simply a bridge to get to the next solution.

    SSD makers right now are making a serious mistake pushing SSDs down consumer's throats during an economic crisis. They should have focused on the enterprise market, targeting DB servers. But in that space, Intel X25-E sits alone without competition. (Supertalent UltraDrive LEs should be within 25% of X25-E by my estimation)
  • pmonti80 - Thursday, March 19, 2009 - link

    Now I understand what you meant in the beginning. But still I don't agree with you, the system reviewed is the one 99% of SSD buyers will use(integrated mobo controller + NTFS). So, why optimize the benchmark to show the bad drives in a good light?

    About the Vertex, I don't understand what you are complaining about. After reading this article most people got the idea that Vertex is a good drive and at half Intel's price (I know, I searched on google for comments about this article).
  • tshen83 - Thursday, March 19, 2009 - link

    Professional people only look at two SSD benchmarks: random read IOPS at 4k and random write IOPS at 4k(Maybe 8K too for native DB pages).

    The Vertex random write IOPS at 4K size is abysmal. 2.4MB/sec at 4K means it only does 600ish random write IOPs. Something was wrong, and Vista/ICH10R didn't help. The 8GB/sec write boundary Anand imposed on the random write IOPS test is fishy. So is the artificial io queue depth = 3.

    The vertex random write IOPS should be better. The random read IOPS also should be slightly better. I have seen OCZ's own benchmark placing the Vertex very close to Intel X25-M at random read/ write IOPS tests.

    I personally think that if you use NTFS, just ignore the SSDs for now until Windows 7 RTM. You can't hurt waiting for SSD price to drop some more in the next 6 months. Same thing for Linux, although I would argue that Linux is even in a worse position for SSDs right now than windows 7. EXT3/EXT4/JFS/XFS/REISERFS all suck on SSDs.
  • gss4w - Thursday, March 19, 2009 - link

    Anandtech should adopt the same comment system as Dailytech so that comments that don't make any sense can be rated down. Who would want to read a review of something using a beta OS, or worse an OS that is only used on servers? I think it would be interesting to see if Windows 7 beta offered any improvements, but that should not be the focus of the review.
  • 7Enigma - Thursday, March 19, 2009 - link

    Here's another vote for the Dailytech comments section. The ability to rate up down, but more importantly HIDE the comments below a threshold would make for much more enjoyable reading.
  • curtisfong - Wednesday, March 18, 2009 - link

    Why should Anand test with Windows 7b or *nix? What is the majority OS?

    Kudos to Anand for testing real world performance on an OS that most use, and to Intel for tuning their drives for it. I'm happy the other manufacturers are losing business..maybe they will also tune their drives for real world performance and not synthetic benchmarks.

    To the poster above: do you work for OCZ or Samsung?
  • Glenn - Wednesday, March 18, 2009 - link

    tshen83 "A very thorough review by tshen83, an hour ago
    BUT, still based on Windows Vista.
    "

    As long as these drives are marketed toward said OS, why would you not use it? Most of us wouldn't recognize Solaris if we saw it! And I believe you seriously overestimate yourself if your gonna drill anything into Anands head! You might need your own site, huh?

    Great Job Anand! Don't forget to remind these CEO's that they also need to provide any software needed to configure and optimize these drives to work properly. ie go to OCZ Forums and try to figure out how to align, optimize and keep your drive running like it's supposed to, in less than 4 hours of reading! It would be nice if these companies would do their own beta testing and not rely on early adopters to do it for them!
  • Roland00 - Wednesday, March 18, 2009 - link

    It was a joy to read all 31 pages
  • MagicPants - Wednesday, March 18, 2009 - link

    Anand it would be really helpful to have a list of SSD companies blacklisting you so I know which ones to avoid. In general it would be nice to know who doesn't provide review samples to reputable sites.

Log in

Don't have an account? Sign up now