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

  • sunbear - Monday, August 31, 2009 - link

    Even though most laptops are now SATA-300 compatible, the majority are not able to actually exceed SATA-150 transfer speeds according to some people who have tried. I would imagine that sequential read/write performance would be important for swap but the SATA-150 will be the limiting factor for any of the SSD's mentioned in Anand's article in this case.


    Here's the situation with Thinkpads:
    http://blogs.technet.com/keithcombs/archive/2008/1...">http://blogs.technet.com/keithcombs/arc...vo-think...

    The new MacBookPro is also limited to SATA-150.
  • smartins - Tuesday, September 1, 2009 - link

    Actually, The ThinkPad T500/T400/W500 are fully SATA-300 compatible, it's only the drives that ship with the machines that are SATA-150 capped.
    I have a Corsair P64 on my T500 and get an average of 180MB/read which is consistent with all the reviews of this drive.
  • mczak - Monday, August 31, 2009 - link

    article says you shouldn't expect it soon, but I don't think so. Several dealers already list it, though not exactly in stock (http://ht4u.net/preisvergleich/a444071.html)">http://ht4u.net/preisvergleich/a444071.html). Price tag, to say it nicely, is a bit steep though.
  • Seramics - Monday, August 31, 2009 - link

    Another great articles from Anandtech. Kudos guys at AT, ur my no. 1 hardware site! Anyway, its really great that we have a really viable competitor to Intel- Indilinx. They really deserve the praise. Now we can buy a non Intel SSD and have no nonsensical stuttering issue! Overall, Intel is still leader but its completely nonsensical how bad their sequential write speed is! I mean, its even slower than a mechanical hard disk! Thats juz not acceptable given the gap in performance is so large and Intel SSD's actually can suffer a significantly worst performance in real world when sequential write speed performance matters. Intel, fix your seq write speed nonsence please!
  • Seramics - Monday, August 31, 2009 - link

    Sorry for double post. Its unintentional and i duno how to delete the 2nd post.
  • Seramics - Monday, August 31, 2009 - link

    Another great articles from Anandtech. Kudos guys at AT, ur my no. 1 hardware site! Anyway, its really great that we have a really viable competitor to Intel- Indilinx. They really deserve the praise. Now we can buy a non Intel SSD and have no nonsensical stuttering issue! Overall, Intel is still leader but its completely nonsensical how bad their sequential write speed is! I mean, its even slower than a mechanical hard disk! Thats juz not acceptable given the gap in performance is so large and Intel SSD's actually can suffer a significantly worst performance in real world when sequential write speed performance matters. Intel, fix your seq write speed nonsence please!
  • Shadowmaster625 - Monday, August 31, 2009 - link

    Subtle. Very subtle. Good article though.

    3 questions:

    1. Is there any way to read the individual page history off the SSD device so I can construct a WinDirStat style graphical representation of the remaining expected life of the flash? Or better yet is there already a program that does this?

    2. Suppose I had a 2 gigabyte movie file on my 60gb vertex drive. And suppose I had 40GB of free space. If I were to make 20 copies of that movie file, then delete them all, would that be the same as running Wiper?

    3. Any guesses as to which of these drives will perform best when we make the move to SATA-III?

    4. (Bonus) What is stopping Intel from buying Indilinx (and pulling their plug)? (Or just pulling their plug without buying them...)

  • SRSpod - Thursday, September 3, 2009 - link

    3. These drives will perform just as they do now when connected to a 6 GBps SATA controller. In order to communicate at the higher speed, both the drive and the controller need to support it. So you'll need new 6 GBps drives to connect to your 6 GBps controller before you'll see any benefit from the new interface.
  • heulenwolf - Monday, August 31, 2009 - link

    Yeah, once the technology matures a little more and drives become more commoditized, I'd like to see more features in terms of feedback on drive life, reliability, etc. When I got my refurb Samsung drives from Dell, for example, they could have been on the verge of dying or they could have been almost new. There's no telling. The controller could know exactly where the drive stands, however. Some kind of controller-tracked indication of drive life left would be a feature that might distinguish comparable drives from one another in a crowded marketplace.

    While they're at it, a tool to allow adjusting of values such as the amount of space not reported to the OS with output in terms of write amplification and predicted drive life would be really nifty.

    Sure, its over the top, but we can always hope.
  • nemitech - Monday, August 31, 2009 - link

    I picked up an Agility 120 Gb for $234 last week from ebay ($270 list price - - 6% bing cashback - $20 pay pal discount). I am sure there will be similar deals around black Friday. $2 per Gb is possible for a good SSD.

Log in

Don't have an account? Sign up now