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

Re: SSD as Cache?



Hi Jochen, hi Paul,

Am Freitag, 8. November 2013, 17:24:22 schrieb Jochen Spieker:
> Paul Johnson:
> > On Fri, Nov 8, 2013 at 8:12 AM, basti <black.fledermaus@arcor.de> wrote:
> >> Can this cache moved to SSD?
> >> Months ago I read articles about SSD and Flash Memory like:
> >> - "Disable logging on SSD"
> >> - "Disable cache on SSD"
> >> - "Don't swap on SSD" ...
> >> 
> >> And today?
> >> How long will the SSD work without data loss?
> > 
> > How many writes is the SSD rated for?  I'd still generally consider flash
> > as generally read-only or disposable.
> 
> The answer to your question is device-dependent. For my old Intel X25m,
> Intel guaranteed 5 years of service with 20GB writes per day. That is
> quote a lot for desktop/notebook use cases. More recent models have a
> shorter lifetime because of increased NAND density.

Similar to the Intel SSD 320 here, which still claims to be new:

merkaba:~> smartctl -a /dev/sda | egrep "^(ID#|172|183|199|228|226|233|241|242)"
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
172 Erase_Fail_Count        0x0032   100   100   000    Old_age   Always       -       169
183 Runtime_Bad_Block       0x0030   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0030   100   100   000    Old_age   Offline      -       0
226 Workld_Media_Wear_Indic 0x0032   100   100   000    Old_age   Always       -       2204077
228 Workload_Minutes        0x0032   100   100   000    Old_age   Always       -       13054351
233 Media_Wearout_Indicator 0x0032   100   100   000    Old_age   Always       -       0
241 Host_Writes_32MiB       0x0032   100   100   000    Old_age   Always       -       328371
242 Host_Reads_32MiB        0x0032   100   100   000    Old_age   Always       -       855085

I have about 328371 * 32 MiB = 10261,594 GiB or about 10 TiB writes, in
2,5 years. Yet the SSD still claims to be new, see media wearout indicator.

I recommend leaving some additional free space. There is a PDF from Intel
regarding long time performance which clearly show that this helps,
unless you already have a heavily overprovisioned SSD – there are special
ones for extra long durability. With some understanding on how a SSD works
this is easily understandable. Look for explainations of the term write
amplification to get a picture.

For a 10 GB cache, I recommend a 32 GB or even 64 GB and to heavily
overprovision it. Make a 20 GiB logical volume on it and leave the rest
untouched unless you need it. Mount with noatime, do a additional fstrim
via cron job from time to time.

Should out live any harddisk this way.

If you want to go even safer, look for a SLC SSD. These are more expensive
but SLC flash can take up to 100000 erase cycles while MLC up to 10000
and that never variante of MLC only several thousands.

Ciao,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: