Effect of partitioning on wear-leveling
Warner Losh
imp at bsdimp.com
Tue Mar 22 03:47:43 UTC 2016
> On Mar 21, 2016, at 9:28 PM, bob prohaska <fbsd at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20160321/38248db2/attachment.sig>
More information about the freebsd-arm
mailing list