Jo22 wrote:I heard of that. The problem is, if you do apply overprovision on an used media, it get's even worse :
Normally, if you do allocate all available flash, the aging process is spread over all cells. (Good)
But if you do reserve used flash, it is never beeing used by the OS/the card and the other cells die more quickly. (Bad)
I can see how that would be an issue - if most/all of the address range you are reserving has already been written before, then this strategy could be counterproductive as far as preserving the card goes. However, if it's reached the state where nearly all logical addresses are considered in use, and thus virtually all the physical flash locations are flagged as "active", then the write amplification rate might have already spiked so badly (10-20x or more) that it dominates the wear issue and nothing you do will make much difference. But maybe I'm being too defeatist here. 😀
I'm on the fence about whether to do this on used cards, but I'm really just advocating this strategy with a new card. With a used one it might not be a good idea, as you pointed out.
On a new card, the wear leveling should be free to map across all physical storage even if only part of the logical address range is used. But I'm making an assumption that the controllers in these things are reasonably intelligent, and that might not be the case.
This might already be well understood, but I just want to elaborate on the theory in case it's unclear to anyone (this assumes a new, pristine card):
Say the first time you write to LBA address 0xC100, the card stores it at some physical location "A". It records the fact that LBA address 0xC100 is being stored at location "A".
A day later you overwrite something else to the same LBA address 0xC100, this time the card maps it to location "B", which happens to be in a completely different place in the actual flash memory.
The flash controller will not waste time and write cycles trying to protect the contents of physical location "A", because it knows that data is obsolete and no longer valid. It knows that location is now available for reuse/garbage collection.
So by restricting the OS to only use say 4GB worth of addresses on an 8GB flash device, the data can still be wear leveled around all the physical flash storage, but at any given time the flash controller will never think more than half of it contains valid data, so performance and write amplification are kept in check.
A solution would be to do a reset or do some blanking.
Note that "erasing" a HDD works in reverse to a "SSD", because their logi […]
Show full quote
A solution would be to do a reset or do some blanking.
Note that "erasing" a HDD works in reverse to a "SSD", because their logical values which do represent 1 (one) and 0 (zero) are internally different.
Im speaking under correction, but I think it works akin to an EPROM.
So if you do use an archaic HDD erasing tool, you may write data patterns to the flash media which it won't recognize as "empty".
I've read of people trying to reset USB flash sticks, but I'm not sure how they would ever recognize anything as being "empty". How does the controller know you didn't intentionally store a string of 1s or 0s that need to be preserved? Yet I think I've read of people claiming that this can work, but I have trouble believing it. I guess it might be interesting to experiment on a junk USB stick sometime. Measure it's performance in some benchmark, do something to intentionally degrade it, benchmark again to confirm, then try different methods of trying to "erase" it and see if performance can be restored.
So to make this work a feature like "secure erase" is required.
I agree, support for "secure erase" would be very appropriate for things like USB sticks and SD cards IMO. Not just for resetting their performance but also for security. I'm kind of surprised it's not an established standard.
Apparently some SD cards do have something similar (see SD Formatter), but I've never seen a card with this feature. Did you ?
Not that I know of, but I've never done much research into SD cards. If they do have some documented way to tell them to consider themselves erased, then that would be a great thing.