On Mon, 2022-12-26 at 20:46 +0100, Nicolas George wrote:
> John Conover (12022-12-26):
> > So, the more unused SD space is better, since wear leveling writes to
> > a "bit" that has been written to fewer times.
> > 
> > To test, say with a 16 GB SD, fill the SD to all except the last 1 KB,
> > and with a looping script, write 1KB of 1's to the remainder of the
> > SD, erase the "bits," then 1KB of 0's, erase the "bits", and so on;
> > the SD card will fail within hours to a few days, (with luck-note that
> > MTBF is mean time between failures, meaning that by MTBF, half will
> > have failed, half still running; its a stochastic/probability issue;
> > it does NOT mean that all are expected to last at least 6K writes.)
> > 
> > Doing the same test without filling to the last 1 KB, and the SD card
> > will last a very long time, (about 16 million total writes.)
> 
> Are you suggesting that the microcontroller of the SD card is capable of
> decoding filesystem data structures to find out which sectors are
> unused?

He didn't mention filesystems.

The controller in the card would surely know what flash blocks contain
data, so writing the whole card first would reserve those blocks as
'in-use' leaving just a relatively small amount of spare blocks which
would be available for erasure and reuse the that repeated write.

However, ff you only ever used the first few GB (say by putting a
filesystem on a partition a fraction the size of the card). Then
there's lots of unused flash blocks that can be cycled through by any
ware levelling algorithm the card implements.

-- 
Tixy

Reply via email to