The SSD Relapse: Understanding and Choosing the Best SSD
by Anand Lal Shimpi on August 30, 2009 12:00 AM EST- Posted in
- Storage
Live Long and Prosper: The Logical Page
Computers are all about abstraction. In the early days of computing you had to write assembly code to get your hardware to do anything. Programming languages like C and C++ created a layer of abstraction between the programmer and the hardware, simplifying the development process. The key word there is simplification. You can be more efficient writing directly for the hardware, but it’s far simpler (and much more manageable) to write high level code and let a compiler optimize it.
The same principles apply within SSDs.
The smallest writable location in NAND flash is a page; that doesn’t mean that it’s the largest size a controller can choose to write. Today I’d like to introduce the concept of a logical page, an abstraction of a physical page in NAND flash.
Confused? Let’s start with a (hopefully, I'm no artist) helpful diagram:
On one side of the fence we have how the software views storage: as a long list of logical block addresses. It’s a bit more complicated than that since a traditional hard drive is faster at certain LBAs than others but to keep things simple we’ll ignore that.
On the other side we have how NAND flash stores data, in groups of cells called pages. These days a 4KB page size is common.
In reality there’s no fence that separates the two, rather a lot of logic, several busses and eventually the SSD controller. The latter determines how the LBAs map to the NAND flash pages.
The most straightforward way for the controller to write to flash is by writing in pages. In that case the logical page size would equal the physical page size.
Unfortunately, there’s a huge downside to this approach: tracking overhead. If your logical page size is 4KB then an 80GB drive will have no less than twenty million logical pages to keep track of (20,971,520 to be exact). You need a fast controller to sort through and deal with that many pages, a lot of storage to keep tables in and larger caches/buffers.
The benefit of this approach however is very high 4KB write performance. If the majority of your writes are 4KB in size, this approach will yield the best performance.
If you don’t have the expertise, time or support structure to make a big honkin controller that can handle page level mapping, you go to a larger logical page size. One such example would involve making your logical page equal to an erase block (128 x 4KB pages). This significantly reduces the number of pages you need to track and optimize around; instead of 20.9 million entries, you now have approximately 163 thousand. All of your controller’s internal structures shrink in size and you don’t need as powerful of a microprocessor inside the controller.
The benefit of this approach is very high large file sequential write performance. If you’re streaming large chunks of data, having big logical pages will be optimal. You’ll find that most flash controllers that come from the digital camera space are optimized for this sort of access pattern where you’re writing 2MB - 12MB images all the time.
Unfortunately, the sequential write performance comes at the expense of poor small file write speed. Remember that writing to MLC NAND flash already takes 3x as long as reading, but writing small files when your controller needs large ones worsens the penalty. If you want to write an 8KB file, the controller will need to write 512KB (in this case) of data since that’s the smallest size it knows to write. Write amplification goes up considerably.
Remember the first OCZ Vertex drive based on the Indilinx Barefoot controller? Its logical page size was equal to a 512KB block. OCZ asked for a firmware that enabled page level mapping and Indilinx responded. The result was much improved 4KB write performance:
Iometer 4KB Random Writes, IOqueue=1, 8GB sector space | Logical Block Size = 128 pages | Logical Block Size = 1 Page |
Pre-Release OCZ Vertex | 0.08 MB/s | 8.2 MB/s |
295 Comments
View All Comments
Mr Perfect - Tuesday, September 1, 2009 - link
Probably demand. When I saw that price, I shopped around to see what was going on. Answer? Everyone else seems to be out of stock.Naccah - Tuesday, September 1, 2009 - link
I've been waiting to get an SSD till Win 7 released hoping that the prices would have stabilized somewhat by that time. The recent price fluctuation is disturbing as well as the availability of the X25 G2. When the G2 first hit Newegg I was surfing the site and could have grabbed one for $230, but like I said I was content to wait. Now I'm having second thoughts! and wondering if I should grab one if the price goes down again.gfody - Tuesday, September 1, 2009 - link
That doesn't explain the 160gb - it's not even in stock yet. I have been waiting a month for this drive to be in stock and here they more than double the price one day before the ETA date! It's an outrage.. if I'd known the drive was $1000 I would have bought something else.Way to screw your customers Newegg
araczynski - Tuesday, September 1, 2009 - link
A) your intro has the familiar smell of tomshardware, you'd do to be without that, its unbecoming.B) your final words smell of the typical big corp establishment mentality; bigger, faster, more expensive, consumers want! while if the market is any indication, is completely the opposite of the truth. people want 'good enough' for cheap, as the recent Wired magazine article more or less said. granted, Wired isn't the source for indepth technical reading, but it is a good source sometimes of getting the pulse of things...sometimes, still, more often than anything coming out of the mouths of the big corps.
C) everything in between A and B is great though :) Please leave the opinions/spins to the PR machines.
Personally, the cost of these things is still more than i'm willing to pay for, for any speed increase. the idiotic shenanigans of firmwares and features only present after special downloads/phases of the moon make me just blow off the whole technology for a few more years. I'll revisit this in say 2 or 3 years, perhaps the MLC's will finally die off and the SLC's (unless i have the 2 backwards) or something better rolls out with a longer lifespan.
Anand Lal Shimpi - Tuesday, September 1, 2009 - link
A) My intention with the intro was to convey how difficult it was for me to even get to the point where I felt remotely comfortable publishing this article. I don't like posting something that I don't feel is worthy of the readership's reception. My sincere apologies if it came off as arrogant or anything other than an honest expression of how difficult it was to complete. I was simply trying to bring you all behind the scenes and take you into the crazy place that's my mind for a bit :)B) I agree that good enough for cheap is important, hence my Indilinx recommendation at the end. But we can't stifle innovation. We need bigger, better, faster (but not necessarily more expensive, thank you Moore's Law) to keep improving. I remember when the P3 hit 1GHz and everyone said we don't need faster CPUs. If we stopped back then we wouldn't have the apps/web we have today since developers can count on a large install base of very fast processors.
Imagine what happens in another decade when everyone has many-core CPUs in their notebooks...
Take care,
Anand
DynacomDave - Tuesday, September 29, 2009 - link
First - Anand thanks for the good work and the great article.I too have an older laptop that has a PATA interface that I'd like to upgrade with an SSD. I contacted Super Talent about their MasterDrive EX2 - IDE/PATA. Their response was; We only use Indilinx controller for SATA drives, like UltraDrive series. We use Phison controller for EX2/IDE drives.
I want to improve performance not degrade it. I don't know if this will perform like the Indilinx or like the old SSDs. Can anyone help me with this?
bji - Tuesday, September 1, 2009 - link
There are a few more smaller players in the SSD controller game that don't ever show up in these reviews. They are Silicon Motion and Mtron. The reason I am interested in them is because I have a laptop that is PATA only (it's old I know but I love it and I want to extend its life with an SSD), and I am trying to get an SSD that works in it.Turns out the Mtron MOBI SSDs are not compatible with this laptop. I have no idea why. So I have put an order into eBay for an SSDFactory SSD and am crossing my fingers that it will work.
Mtron makes SATA SSD drives so they could be included in these reviews, and I don't know why they are excluded. It would be interesting to see how their controllers stack up. I personally own two Mtron SSD drives (both 32 GB SLC drives) that I tried to get to work in my laptop and failed to - so one is now the system disk in my desktop and it is very fast (at least compared to platter drives, maybe not compared to newer SSDs). The other one I am still trying to find a use for.
The only Silicon Motion controller drives I have seen are PATA drives so they clearly are a different beast than the SATA drives typically reviewed in these articles. But I would still be interested in seeing the numbers for the Silicon Motion controller just to get an idea of how well they stack up against the other controllers, especially for the 4K random writes tests. The PATA interface ought not to be the limiting factor for that test at least.
paesan - Tuesday, September 1, 2009 - link
I see NewEgg has a Patriot Troqx and a Patriot Torqx M28. What is the difference in the 2 drives.paesan - Tuesday, September 1, 2009 - link
After reading thru the Patriot forum I found the differences. The M28 has 128MB cache compared to 64MB cache on the non M28. The biggest difference is the M28 uses a Samsung controller instead of the Indilinx controller on the non M28. I wonder why they switched controllers.valnar - Tuesday, September 1, 2009 - link
It seems to be that using trim would make a "used" SSD faster, no doubt, but is it required? Would it be okay to buy an SSD for a Windows XP box and just set and forget it? Even used and fragmented, it appears to be faster than any hard drive. My second question is longevity. How long would one last compared to a hard drive?