Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Mar 2016 21:47:39 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        bob prohaska <fbsd@www.zefox.net>
Cc:        Ian Lepore <ian@freebsd.org>, freebsd-arm@freebsd.org
Subject:   Re: Effect of partitioning on wear-leveling
Message-ID:  <E985EBE6-E062-4C5E-8F85-ECB7BDE98DE8@bsdimp.com>
In-Reply-To: <20160322032832.GC83908@www.zefox.net>
References:  <20160321175952.GA83908@www.zefox.net> <1458586884.68920.96.camel@freebsd.org> <20160321221153.GB83908@www.zefox.net> <1458600070.68920.107.camel@freebsd.org> <20160322032832.GC83908@www.zefox.net>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]

> On Mar 21, 2016, at 9:28 PM, bob prohaska <fbsd@www.zefox.net> wrote:
> 
> On Mon, Mar 21, 2016 at 04:41:10PM -0600, Ian Lepore wrote:
>> 
>> Also, it's been my experience that it's impossible to "wear out" an
>> sdcard.  I once ran a program that just wrote random data continuously
>> at full speed to a 512MB card for several months nonstop.  No noticible
>> effect on the card.  I actually still use that card today (in one of
>> our older products whose filesystem image only needs about 40MB).
>> 
>> 
> Have you ever checked to see how much of the 512 MB capacity remains?
> Seems that quite a lot of decay wouldn't show up if you're using less
> than 10% of the device's capacity.

If you are writing to only 10% of the LBA range, you should have 90% of
the LBA range in addition to the normal reserve. This should mean that you’ve
got 10x the normal reserve (since normally the reserve is in the 10% range,
give or take). SD cards don’t lose capacity. Then tend to fail read-only or read-never
when they reach their end of life.

So let’s do the math. 512MB cards tended to have write speeds of maybe 6MB/s.
At 6MB/s, that’s about 518MB/day, or one drive write per day. Most SD cards,
when you can find a rating, are good for between 0.3 and 1 drive write per day
over their life (some are more durable, granted). 0.3 DWPD would mean that we’re
putting wear not he part at 3x the normal rate. Over several month, that’s nowhere
near the 3 year design point that most SD cards implement. It’s maybe 2 years of
wear tops. If it’s a better card, it isn’t even one year worth of writes.

So it isn’t too surprising that Ian’s experience wasn’t so horrible. I ran a similar
experiments and failed to wear things out. It wasn’t until I worked at a NAND
card maker that I ever wore out NAND. And to do that I had to wear out some
tiny percentage of the drive by artificially limiting the range of NAND used to
a range of erase blocks (usually around 50 or maybe 10 GB of space) and writing
at full speed (something in the neighborhood of 1GB/s) would give maybe
50 P/E cycles an hour (due to swell limitations), leading to wear out over a long
weekend… And that’s using ~1% of the capacity of the drive at a time.

Warner

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJW8MBcAAoJEGwc0Sh9sBEAJWkP/R/Jf+tROSgcTlhhJC2Z4S5W
zi0knjml1KFchPzEpxkAwvmmBVrNLewbDgAYYO9UZtzw4b+wAtLBG/Hj/AB1V/tR
RcCtvsm8ovTjpJQxzDEZ7UvGW1oecjMwjYHkrW11JbkGmuMsrH03KyxYv+E7YLc/
hdEFjNA9+jFy52lTIsu2r37/CXshyzt1BLIJS1enyGXq7ByV1e7XJ/E23AaXXoNe
3y4FRqddZIHE9vK8wp2HPEksCk9BGqtaqThtSWB0VuOK0gsxiP+kgS+ARrwHBv90
KjZReSTtScQlDFg0jNj2V2LV/cjL6QGITSUsO3fAiPHrfkQErrfdNVx91WHAF1EK
lKRa59MGyxcA4zYPtvJ3be+z7O6DCVDZ8e4dYgkqPDPma3YucotSzHaX+XczomAa
76WiBB4oRRifmlqMjdSjKd+NCNQx3z/dyzjSlwISv9JHHcX14SMNFDX2OlWCd9WH
dJvO8qXlGWC3bFBYjfISlvNKuTKLkl3CktKPQDb4PVknZG3VVzTLrJa4gXoizkQo
vAcAEBcYjY3DUdAA5nkfdVe4nJV0tJUiEiwt7iRAisy5wuCwhDh4/TXSVebwFss0
c605dUMFHXNciCzGG9mBf0wTR7QFDgWwzkxCA3cgJHVy32epHRmacNW/iLXrjLDm
XTEfRIa8Fs3pS0vPoYCc
=k5q9
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E985EBE6-E062-4C5E-8F85-ECB7BDE98DE8>