Flash disks and FFS layout heuristics

Matthew Dillon dillon at apollo.backplane.com
Sun Mar 30 14:00:16 PDT 2008


:Your description of a simplified version of what is commonly called
:a "Flash Adaptation Layer", is a very good example of why there is
:a clear difference between "camera grade" flash devices, like most
:CF cards, and the new generation of "SSD" devices, like the M-Tron
:disk now in my laptop.
:
:The Camera grade Flash devices get lousy random write performance
:because they implement in essense what you describe, only in a more
:complete fashion where they have error correction, both the data
:and on the bitmaps.
:
:The newer generation of SSD devices do things much smarter than
:that, which is why their random write performance is much better
:than camera-grade devices.
:
:See my earlier emails for references to how to do the really smart
:thing.
:
:-- 
:Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20

    Er, why don't you explain it again, because I can't find the reference.

    You can only write to flash so fast.  What I described is a fairly
    maximal implementation.  The only way to make things faster is to
    add some dime-cap-backed static ram as a front-end cache and to gang
    writes to multiple flash chips (which is fairly standard).  A
    dime-cap-backed static ram will retain the cache for upwards of a month.
    If you go LI-battery backed static ram then cache retention is
    around 5-years.

    Most 'camera grade' devices are one or two physical chips.  Write
    performance, particularly when writing out large linear files, tends
    to be limited by the fact that there aren't very many flash chips
    and so you have no ability to gang writes in parallel.

    Any sort of SSD device is typically going to have anywhere from four
    to 'many' physical flash devices on board.  Write performance to such
    devices will be an order of magnitude faster, really only limited by
    design choices on how the flash devices are ganged.  A 'wide data' bus
    is the most convenient way to gang writes.  There are also current
    limitations which limit how many physical chips you can write to in
    parallel, though modern flash devices have much lower write current
    requirements then older ones and if it is packaged as a SATA drive then
    it has tons of current capability simply by having access to a power
    connector capable of delivering the currents required by normal hard
    drives.  CF and other small-format flash devices do not have NEARLY
    the same current delivery capabilities.

    In anycase, there is nothing magical about any of this.  You still need
    to spread the data out on the physical flash devices to avoid wearing out
    cells.  Perceived improvements in performance are entirely due to having
    a front-end non-volatile ram cache and ganging writes in parallel.

						-Matt



More information about the freebsd-arch mailing list