Joseph Loo wrote:
> Bzzzz wrote:
> > Andrew McGlashan wrote:
> > ...
> ...
>
> I think you are missing the problem associated with SSd. The wear problem is
> associated with the amount of free space. If the drive is 99.99% full, you
> could probably wear the drive out in no time at all. The wear problem is
> prevented by using free space that has not been written to it. thus if 00 %
> full drive will wear out faster than a drive that is 1% full. If you do not
> speak in context of the percentage full the benchmarks are not too useful.

That depends upon the quality of the device.  Higher quality SSDs
always have internal space in which to move data around.  This quality
issue was especially notable with earlier devices and with bad clones.
A lot of early nand flash devices were terrible!  But now high quality
vendors always include unadvertised internal space in which to operate
for wear leveling.

Also remember that SSDs operate acceptably well without trim telling
it that blocks are free.  Sure trim can help improve things!  I am not
discounting trim.  But SSDs still operate even when used in a system
that does not have knowledge of trim.  How many people have installed
an SSD in their laptop or other mobile device as a spinning disk
replacement but never enabled trim on that device?  (Me for one.)  In
that case the drive does not have knowlege of file system structure.
In that case the drive always thinks it is 100% full.  It never gets a
trim erase instruction.  It only gets write instructions.  I will take
a guess that most SSDs in actual operation today always think they are
100% full.  That will change as more systems with SSDs come into the
world that have the trim feature operating.

But even with trim letting the drive know that some blocks are
available for erase if you fill the disk up to 90% and then don't
rewrite any of those files again then you *think* those files are
never (re)written again.  But that isn't the way SSD firmware works.
SSD firmware reserves free space internally to the drive and mixes it
into the pool.

For wear leveling the firmware will copy data from one block to
another.  It won't simply hammer away at a single block re-writing it
endlessly.  It really can't since it takes so long to erase.  It must
pre-erase blocks that it intends to use later.  Internally those will
be erased in large chunks.  Therefore the firmware will always arrange
to pre-erase as much as possible.  The trim command helps but with
reserved space it is a help not a requirement.

> Most consumer grade ssd are limited to about 10K writes per cell. If you
> exceed the limit, dead cell. Remember that another factor involve is the
> number of spare cells. all of these things play in the role when an ssd
> fails.

Say a 60G device might have 64G of actual space but never exposes more
than 60G to the consumer.  The firmware will actually have 64G of
total space to operate.  It can keep 4G pre-erased in the internal
free lists.  The firmware sees a request to write a few blocks.  It
pulls some blocks off the internal free list and writes them.

But while you can request a write to 512 bytes you can't write that
small of a block internally in the SSD.  In order to write a few bytes
the SSD firmware will really need to read a much larger internal sized
block, modify just those small few bytes, then write the entire larger
sized block.  These larger internal blocks are usually at least a
megabyte.  This write must be to a different area in the pool.  The
previous area in the pool is then available for erasing.  It will be
queued and erased in the background.  This generally causes a
migration of data across the pool.  This is good for wear leveling.
But writing small blocks is inefficient and therefore for performance
reasons the firmware will buffer up as much as possible and try to
write only larger blocks at a time.

This action of needing to erase large blocks and rewriting blocks
causes all of the data in the SSD to be continously re-written as the
SSD is used.  Which is a good thing for reliability and for wear
leveling.  If a block can't be written it can be marked failed
internally and another block used.  The performance of doing this
buffer, write, erase, write is strongly influenced by the firmware.
This is why SSD companies closely guard their firmware and why some
companies benchmark better than others even when the underlying nand
flash technology seems very similar.  The controller hardware and
firmware for managing it is critical to reliability and performance.

It is this continous internal movement of data in an SSD which enables
it to continue to function successfully even without trim operating.
And it provides wear leveling.  It doesn't really matter if the file
system structure layer waaaay out on the consumer end is full or not.
(Although having trim helps and improves things by allowing the
firmware to queue those blocks for pre-erase sooner.)

Larger capacity SSDs should last longer due to being able to wear
level over their full capacity.  A 600G SSD should last through many
more consumer write cycles than a 30G SSD as it has more total blocks
to wear level across.

Bob

Attachment: signature.asc
Description: Digital signature

Reply via email to