DragonFly BSD
DragonFly users List (threaded) for 2010-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: SSD for boot and swapcache

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 3 Dec 2010 13:11:45 -0800 (PST)

    I also have an explanation in the swapcache manual page:


    But since people keep asking about it I'll try to explain it more
    fully.  Hmm.  I might as well add this to manual page too, which
    I will do.

    Modern SSDs keep track of space that has never been written to.
    This would also include space freed up via TRIM, but simply not
    touching a bit of storage in a factory fresh SSD works just as well.
    Once you touch (write to) the storage all bets are off, even if
    you reformat/repartition later.  It takes sending the SSD a
    whole-device TRIM command or special format command to take it back
    to its factory-fresh condition (sans wear already present).

    SSDs have wear leveling algorithms which are responsible for trying
    to even out the erase/write cycles across all flash cells in the
    storage.  The better a job the SSD can do the longer the SSD will
    remain useable.

    The more unused storage there is from the SSDs point of view the
    easier a time the SSD has running its wear leveling algorithms.
    Basically the wear leveling algorithm in a modern SSD (say Intel or OCZ)
    uses a combination of static and dynamic leveling.  Static is the
    best, allowing the SSD to reuse flash cells that have not been 
    erased very much by moving static (unchanging) data out of them and
    into other cells that have more wear.  Dynamic wear level is
    the worst kind but the easiest to implement.  USB sticks often use
    only dynamic wear leveling and have short life spans because of
    that.  SSDs which do write-combining (placing non-linear sectors
    next to each other physically in order to reduce write amplification
    effects) also use static wear leveling to simplify write-combined areas,
    making accesses to the SSD go faster by reducing the complexity of
    the lookup tables the SSD has to maintain.

    In anycase, any unused space in the SSD effectively makes the dynamic
    wear leveling the SSD does more efficient by giving the SSD more 'unused'
    space above and beyond the physical space it reserves beyond its stated
    storage capacity to cycle data throgh, so the SSD lasts longer in theory.


    It's very hard to test this sort of thing.  I've been running a long
    term test on one of our package building boxes for almost a year now
    with a 40G Intel SSD using the space reservation idea (using only 32G
    out of a 40G SSD) but I don't have a similar test using the whole
    drive so I can't really determine how much more efficient it is.  But
    I still recommend it.  Any drive which has TRIM will definitely make
    use of any pristine unused storage just as if it had been TRIMmed.

					Matthew Dillon 

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]