[ZFS] Using SSD with partitions

Charles Sprickman spork at bway.net
Sun Oct 16 21:49:42 UTC 2011


On Oct 16, 2011, at 3:10 PM, Florian Wagner wrote:

>>> 1) I would like a definition of what "unprotected SSD" means and
>>> what a "protected SSD" is.
>> 
>> Let me better quote again, "Many high-end SSDs have backup batteries
>> or capacitors to ensure that operations complete even if power fails.
>> Our results argue that these systems should provide power until the
>> chip signals that the operation is finished rather than until the data
>> appears to be correct. Low-end SSDs and embedded systems, however,
>> often do not contain backup power sources due to cost or space
>> constraints, and these systems must be extremely careful to prevent
>> data loss and/or reduced reliability after a power failure."
> 
> I can provide a practical data point on this. I've tested power failure
> with some Corsair Force SSD. I've used one of the tools available for
> that. The process goes like that:
> 
> 1. Start some kind of server application which waits for messages.
> 2. Start a client application which in a loop does:
>    a. Write a block of data to disk.
>    b. Call fsync/fdatasync to make sure the written data is on this.
>       This systemcall sould block the application until all layers
>       (including) the disk driver and thus the disk signal the write
>       has completed.
>    c. Send a message to the server which then displays the block
>       number written.
> 3. Cut power to the SSD.
> 
> A correctly behaving drive should have at least as many data blocks on
> disk as are displayed in the server application. Sometimes even more.
> 
> For the tested SSD data blocks amounting to about 1 to 1.2 MB of data
> were consistently missing even thought they were signaled to be on disk.
> 
> Care was taken to ensure that all involved OS subsystems were capable
> of handling the fsync/fdatasync calls correctly and passing them
> to lower layers (which is not the case for all filesystems in older
> versions of Linux for example).
> 
> I've just recently repeated the test for a Intel 320 drive (the 120 GB
> version, but should be the same for all models) which includes a set of
> capacitors. These exhibit correct behavior. No missing data for about a
> dozen trials.

This sounds like diskchecker:
http://brad.livejournal.com/2116715.html

There are finally some affordable drives (eg: $100 40GB for ZIL)
that incorporate a capacitor that allows the drive to flush cache
to flash.  My understanding is that the Intel 320 series have this
and supposedly some of the OCZ drives (Vertex Pro 2, Vertex Pro 3).
Intel is the only one I'm finding that has an explicit declaration
that data is safely flushed though:

http://newsroom.intel.com/servlet/JiveServlet/download/38-4324/Intel_SSD_320_Series_Enhance_Power_Loss_Technology_Brief.pdf

The PostgreSQL lists have some interesting info, as they are pretty
conservative about the definition of "safe" writes.  Also one of
the devs posted this earlier this year:

http://blog.2ndquadrant.com/en/2011/04/intel-ssd-now-off-the-sherr-sh.html

For ZFS ZIL use, it also seems like mirroring is generally
recommended.  Since ZIL doesn't benefit from large drives, the
lowest priced Intel 320 x2 is not a bank-breaker.

Charles


> 
> Regards
> Florian Wagner



More information about the freebsd-fs mailing list