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

A Quick Flash Refresher The Cleaning Lady and Write Amplification
Comments Locked

295 Comments

View All Comments

  • Jedi2155 - Monday, August 31, 2009 - link

    Anandtech has always been known for its in-depth analysis, you're just looking for a simple review list. I much prefer these detailed articles than just hearing the list of performance and simple recommendations that most people can write if provided the proper hardware.

    I love how Anand always writes excellent, very well detailed articles that are still SIMPLE to understand. A number of other sites may offer some similar levels of detailed but are sometimes a bit too difficult to comprehend without a background in the same field.
  • KommisMar - Sunday, April 4, 2010 - link

    Anand,

    I read your long series of articles on SSDs today, and just wanted to say thanks for writing the most informative and interesting series of tech articles I've read in years. I've been avoiding SSDs because my first experience with one was horrible. The sustained transfer rates were no better than a traditional hard drive, and the system halting for several seconds on each random write operation was too much for me to stand.

    I was so sick of the SSD coverage that I was reading on other websites because none of them seemed to answer my biggest question, which was "Which SSD won't bring my system to a screeching halt every time it needs to write a little data?"

    Thanks for answering that question and explaining what to look for and what to avoid. It sounds like it's a good time for me to give SSDs another shot.
  • jamesy - Thursday, April 22, 2010 - link

    That about sums it up: disappointment. Although this was a top-caliber SSD article, like i have come to love and expect out of anand, this article didn't make my buying decision any easier as all. In fact, it might have made it more complicated.

    I understand Intel, Indillinx, and Sandforce are good, but there are so many drives out there, and most suck. This article was amazing by most standards but the headline should be changed: removing the "Choosing the Best SSD."

    Maybe "Choosing the right controller before sorting through a hundred drives" would be an appropriate replacement.

    Do i still go with the intel 160 X-25m G2?
    Do I get the addon Sata 6g card and get the C300?
    Do i save the money, and get an indillinx drive? Is the extra money worth the Intel/C300 drive?

    These are the main questions enthusiasts have, and while this article contained a great overview of the market in Q3 2009, SSD Tech has progressed dramatically. Only now, i think, are we getting to the point that we could publish a buying guide and have it last a few months.

    I trust Anandtech, i just wish they would flat-out make a buying guide, assign points in different categories (points for sequential read/write, points for random read/write, points for real-life performance or perceived performance, points for reliability, and points for price.). Take all of these points, add em up, and make a table pls.

    A few graphs can help, but the 200 included in each article is overwhelming, and does nothing to de-complicate or make me confindent in my purchase.

    It's great to know how drives score, how they perform. But it's even important to know that you bought the right drive.
  • mudslinger - Monday, June 28, 2010 - link

    This article is dated 8/30/2009!!!!
    It’s ancient history
    Since then newer, faster SSD’s have been introduced to the market.
    And their firmware have all been updated to address known past issues.
    This article is completely irrelevant and should be taken down or updated.
    I’m constantly amazed at how old trash info is left lingering about the web for search engines like Google to find. Just because Google lists an article doesn’t make it legit.
  • cklein - Monday, July 12, 2010 - link

    Actually I am trying to find a reason to use SSD.
    1. Server Environment
    No matter it's a webserver or a SQL server, I don't see a way we can use SSD. My SERVER comes with plenty of RAM 32G or 64G. The OS/start a little bit slow, but it's OK, since it never stop after it's started. And everything is loaded into RAM, no page file usage is needed. So, really why do we need SSD here to boost the OS start time or application start time?
    For SQL server database, that's even worse. Let's say I have a 10GB SQL server database, and it grows to 50GB after a year. Can you image how many random writes, updates between the process? I am not quite sure this will wear off the SSD really quick.

    2. For desktop / laptop, I can probably say, install the OS and applications on SSD, and leave everything on other drives? And even create page file on other drives? As I feel SSD is only good for readonly access. For frequent write, it may wear off pretty quick? I am doing development, I am not even sure I should save source code on SSD, as it compiles, builds, I am sure it writes a lot to SSD.

    So over all, I don't see it fits in Server environment, but for desktop/laptop, maybe? even so, it's limited?

    someone correct me if I am wrong?
  • TCQU - Thursday, July 29, 2010 - link

    Hi people

    I'm up for getting a new Macbook pro with ssd.
    BUT i heard somthing about, that the 128gb ssd, for apples machines, was made by samsung. I was ready to buy it, but now that i've heard that first of all "apples" ssd's is much slower that they others on the marked. Then i read this. So now i'm really confused.
    What shoud i do?
    buy apples macbook pro with 128gb ssd
    or should i buy it without and replace it with an other ssd? thoughts? plzz help me out
    thanks
    Thomas
  • TCQU - Thursday, July 29, 2010 - link

    Hi people

    I'm up for getting a new Macbook pro with ssd.
    BUT i heard somthing about, that the 128gb ssd, for apples machines, was made by samsung. I was ready to buy it, but now that i've heard that first of all "apples" ssd's is much slower that they others on the marked. Then i read this. So now i'm really confused.
    What shoud i do?
    buy apples macbook pro with 128gb ssd
    or should i buy it without and replace it with an other ssd? thoughts? plzz help me out
    thanks
    Thomas
  • marraco - Friday, August 13, 2010 - link

    Why Sandforce controllers are ignored?

    I’m extremely disappointed with the compiler benchmark. Please test .NET (With lot of classes source files and dependencies). It seems like nothing speeds up compilation. No CPU, no memory, no SSD. It makes nonsense.
  • sylvm - Thursday, October 7, 2010 - link

    I found this article of very good quality.

    I was looking for a similar article about express card SSDs using PCIe port, but found nothing about their performance for rewrite.
    The best I found is this review http://www.pro-clockers.com/storage/192-wintec-fil... saying nothing about it.

    Expresscard SSDs would allow good speed improvement/price compromise : buying a relatively small and cheap one for OS and softwares, while keeping the HDD for data.

    Has anyone some info about it ?

    Best regards,

    Sylvain
  • paulgj - Saturday, October 9, 2010 - link

    Well I was curious about the flash in my Agility 60GB so I opened it up and noted a different Intel part number - mine consisted of 8 x 29F64G08CAMDB chips whereas the pic above shows the 29F64G08FAMCI. I wonder what the difference is?

    -Paul

Log in

Don't have an account? Sign up now