Mailing List Archive


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

Re: [tlug] Making better use of SSDs?: Beware of Heavy Write Usage



On Mon, 28 May 2012 17:23:56 +0900
Simon Cozens <simon@example.com> wrote:

> On 28/05/2012 11:39, jep200404@example.com wrote:
> > Writes wear out SSDs.
> 
> I think this is one of those bits of conventional wisdom which used to be true 
> when the technology was first being introduced, but now isn't so much.

Not really. It is now more true than ever... depending on what you look at :-)

The standard multi-level-cell NAND Flash chips used in SSDs have about
10'000 write cycles endurance. That means, after having written and erased
a block for 10'000 times, you have a good chance that the cell will be not
be correctly writable the next time. Please note that this not a hard limit
as in "it will fail on the 10'001st write" but an increasing probability.
Ie read the spec as "don't expect your flash working correctly after
_about_ 10'000 erase-write cylces to the same block"

Now, because nobody wants to have his diskdrive fail there are several
techniques applied:

* wear leveling (some addresses are written more often than others
  -> exploit this to get a more uniform wear accross the drive)
* backup memory (unused blocks that come into play when a used block fails)
* write combining (cache blocks and write them at all at once instead of
  writing individual bytes)

Although this techniques get you pretty far in terms of lifetime, they are
not magic. They cannot prolong the life of a drive beyond what is physically
possible. And the physical limit is writing the whole drive 10'000 times.
For a 64GB drive that means that if you have written more than 640TB, you
will have visible dead blocks. Now how much is that? If you assume a 10y life
time of the disk, that means approximately 2MB/s average write speed. 

Now, how much that is depends on your use of the disk. If it's a heavily
used database server, then you probably have more writes than that.
If it's just a desktop... Well, i doubt you get more than that unless
you use something stupid as gnome (where the config system is known to
rewrite the config files every few seconds).

Generally it's safe to assume you will not reach that limit within the
usefull lifetime of the computer, unless you have an I/O heavy system.

But: keep in mind that the above back of the envelope calculation is for the
case of an optimal wear leveling algorithm. No disk will reach that level.
For once, the wear level algorithm is not perfect, ie it cannot balance
write over all blocks equally. For another you will have to reallocate blocks
that have not been written for a long time in order to balance them, and
thus generating unnecessary writes. And last but not least, you will have
write in smaller chunks than the erase block size because the OS filesystem
handling is based on 4k chunks and not on 128k chunks.
If you really want to do reliability calculations like this and depend on them,
add at least a factor of 2, if not 5 or 10. And then it starts looking quite
differently....

Also keep in mind that SSDs have been previously marketed for the server
busines, where reliability was more important than price (at least to
some extend). But nowadays, nearly all SSDs are consumer products, where
quality counts very little, especially if not visible within the first
month, but price is everything.

If you really need SSDs with high life time, there are manufacturers
who build SSDs with single level NAND Flash, that have a 100k cycle life time.
But they are factor of >10 more expensive (factor 2-4 because of the more
expensive flash chips, and another factor 2-10 because of the lower volumes).

			Attila Kinali


-- 
Why does it take years to find the answers to
the questions one should have asked long ago?


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links