A Quick Flash Refresher

DRAM is very fast. Writes happen in nanoseconds as do CPU clock cycles, those two get along very well. The problem with DRAM is that it's volatile storage; if the charge stored in each DRAM cell isn't refreshed, it's lost. Pull the plug and whatever you stored in DRAM will eventually disappear (and unlike most other changes, eventually happens in fractions of a second).

Magnetic storage, on the other hand, is not very fast. It's faster than writing trillions of numbers down on paper, but compared to DRAM it plain sucks. For starters, magnetic disk storage is mechanical - things have to physically move to read and write. Now it's impressive how fast these things can move and how accurate and relatively reliable they are given their complexity, but to a CPU, they are slow.

The fastest consumer hard drives take 7 milliseconds to read data off of a platter. The fastest consumer CPUs can do something with that data in one hundred thousandth that time.

The only reason we put up with mechanical storage (HDDs) is because they are cheap, store tons of data and are non-volatile: the data is still there even when you turn em off.

NAND flash gives us the best of both worlds. They are effectively non-volatile (flash cells can lose their charge but after about a decade) and relatively fast (data accesses take microseconds, not milliseconds). Through electron tunneling a charge is inserted into an N-channel MOSFET. Once the charge is in there, it's there for good - no refreshing necessary.


N-Channel MOSFET. One per bit in a NAND flash chip.

One MOSFET is good for one bit. Group billions of these MOSFETs together, in silicon, and you've got a multi-gigabyte NAND flash chip.

The MOSFETs are organized into lines, and the lines into groups called pages. These days a page is usually 4KB in size. NAND flash can't be written to one bit at a time, it's written at the page level - so 4KB at a time. Once you write the data though, it's there for good. Erasing is a bit more complicated.

To coax the charge out of the MOSFETs requires a bit more effort and the way NAND flash works is that you can't discharge a single MOSFET, you have to erase in larger groups called blocks. NAND blocks are commonly 128 pages, that means if you want to re-write a page in flash you have to first erase it and all 127 adjacent pages first. And allow me to repeat myself: if you want to overwrite 4KB of data from a full block, you need to erase and re-write 512KB of data.

To make matters worse, every time you write to a flash page you reduce its lifespan. The JEDEC spec for MLC (multi-level cell) flash is 10,000 writes before the flash can start to fail.

Dealing with all of these issues requires that controllers get very crafty with how they manage writes. A good controller must split writes up among as many flash channels as possible, while avoiding writing to the same pages over and over again. It must also deal with the fact that some data is going to get frequently updated while others will remain stagnant for days, weeks, months or even years. It has to detect all of this and organize the drive in real time without knowing anything about how it is you're using your computer.

It's a tough job.

But not impossible.

Index Live Long and Prosper: The Logical Page
Comments Locked

295 Comments

View All Comments

  • valnar - Wednesday, September 2, 2009 - link

    Anyone?
  • antinah - Tuesday, September 1, 2009 - link

    For another great article on the SSD technology.

    I'm considering an Intel G2 for my brand new macbook pro, and if I understand what I've read correctly, performance should not degrade too much although OSX doesn't support trim yet.

    I also doubt Apple will wait too long before they release an update with trim support for osx.

    I just recently switched to mac after a lifetime with pc/windows. Anything i shoud be aware of when I install the SSD in a mac compared to pc running windows? (other than voiding the warranty and such). I'm thinking precations regarding swap usage or such.

    Best regards from norway
    Stein
  • medi01 - Tuesday, September 1, 2009 - link

    So I absolutelly need to pay 15 times as much per gigabyte as normal HDDs, so that when I start Photoshop, Firefox and WoW, straight after windows boots, it loads whopping 24 seconds faster?

    That's what one calls "absolutelly need" indeed and you also chose amazingly common combination of apps.
  • Anand Lal Shimpi - Tuesday, September 1, 2009 - link

    You can look back at the other two major SSD pieces (X25-M Review and The SSD Anthology) for other examples of application launch performance improvements. The point is that all applications launch as fast as possible, regardless of the state of your machine. Whether you're just firing it up from start (which is a valid use scenario as many users do shut off their PCs entirely) or launching an application after your PC has been on for a while, the apps take the same amount of time to start. The same can't be said for a conventional hard drive.

    Take care,
    Anand
  • Seramics - Tuesday, September 1, 2009 - link

    its not abt the 24seconds but rather the wholly different experience of near instantaneous u get wit ssd tht cannot be replicated by hdds
  • medi01 - Tuesday, September 1, 2009 - link

    Nobody starts mentioned apps together directly after boot.

    I've played WoW for a couple of years, and never had to wait dozen of seconds for it to start.

    Most well written applications start almost instantly.

    And the whole "after fresh boot" is not quite a valid option neither, I don't recall when I last switched off my pc, "hibernate" works just fine.

    The "you get completely different experience" MIGHT be a valid point, but it was destroyed by ridiculous choice of apps to start. And I suspect that it is because NOT starting stuff all together and right after boot, didn't show gap as big.
  • kunedog - Tuesday, September 1, 2009 - link

    Anand, I think your article titled "Intel Forces OCZ's Hand: Indilinx Drives To Drop in Price" (http://www.anandtech.com/storage/showdoc.aspx?i=36...">http://www.anandtech.com/storage/showdoc.aspx?i=36... could also use a follow-up, primarily to explain why the opposite has happened (especially with the Intel drives). Is this *all* attributable to Intel's disaster of a product launch? Maybe not, but in any case it deserves more attention than a brief mention at the end of this article.
  • zero2espect - Tuesday, September 1, 2009 - link

    great work again. it's for this reason that i've been coming here for ages. great analysis, great writing and an understanding about what we're all looking for.

    one thing that you may have overlooked is the difference in user experience due to the lack of hdd "buzz". fortunate enough to find myself in posession of a couple of g2160gb jobbies, one is in my gaming rig and the other in the work notebook. using the notebook the single biggest difference is speed (it makes a 18mo old notebook seems like it performs as fast as a current generation desktop) but the next biggest and very noticible difference is the lack of "hum", "buz", "thrash" and "vibrate" as the drive goes about it's business.

    thanks anadtech and thanks intel ;-P
  • Mr Perfect - Tuesday, September 1, 2009 - link

    Anand,

    Would you happen to know if there are different revisions of the G2 drives out? Newegg is listing a 80GB Intel drive with model #SSDSA2MH080G2C1 for $499, and another 80GB Intel with model #SSDSA2MH080G2R5 for $599. They are both marked as 2.5" MLC Retail drives, and as far as I can tell they're both G2. What has a R5 got that a C1 doesn't? The updated firmware maybe?

    Thanks!

    PS, dear Newegg, WTF? 100% plus price premiums? I'm thinking I'll just wait until stock returns and buy from another site just to spite you now....
  • gfody - Tuesday, September 1, 2009 - link

    It looks like the R5 is just a different retail package - shiny box, nuts and a bracket instead of just the brown box.
    Why Newegg is charging an extra $100 for it.. just look at what they're doing with the other prices. I am losing so much respect for Newegg right now. disgusting!

Log in

Don't have an account? Sign up now