SD life expectancy
StevenR
Posts: 13
Anyone have any real life experience on how many read/write cycles an SD can do.
I have a prop app that stores a MIDI file on an SD card in 512 byte block writes and then plays it. It reads and parses the file one byte at a time.
A MIDI file averages 30K in size so that means 30K reads just to play one file.
At that rate how long can I expect an SD to live?
Steven.
I have a prop app that stores a MIDI file on an SD card in 512 byte block writes and then plays it. It reads and parses the file one byte at a time.
A MIDI file averages 30K in size so that means 30K reads just to play one file.
At that rate how long can I expect an SD to live?
Steven.
Comments
My understanding is the writing lifetime is 5 to 10 thousand cycles.
But just as Jim said the hardware attempts to write to different sectors essentially using the whole before starting over again.
I have tried to abuse a card by writing a 100K byte file at least 2 million times. It never failed.
OK, this was well in excess of my needs so I quit.
Duane
It's probably not a good idea to write one byte at the time though.. it'll have to rewrite a full 32 bytes (if SD) or 512 bytes (if SDHC) every time. Depending a bit on the filesystem, the OS (if any), and the card itself - new, big cards keep some RAM write cache on board, so it can be a little difficult to figure out exactly what will happen if you write just one byte at the time. It's best to be a bit careful with it though.
-Tor
While I have yet to wear out any of my SDcards, I skimped on a few USB memory sticks and all of those failed very early on. One was a free give-away from "The Economist" magazine.
I doubt if anyone will ever really know the useful life of these kinds of storage. I followed a huge debate with the EEEpc's solid state RAM and while it did offer solid strategies for wear reduction, nobody could pin down the useful life.
The fact that READS do not enter into the wear factor is very useful.
While not relevant to the Propeller directly, it is relevant to particular storage strategies.
This brings to mind another feature of Unix/Linux that is extremely handy ==> Read Only Partitions
After developing an application for a Propeller, it would be nice to have the whatever doesn't require revision located in a Read Only Partition. But the problem here is that SDcards and USB memory sticks are only optimized for MS files systems. You can format to a Linux EXT2 partition, but I suspect the wear-leveling features are no longer operating properly. At least you can have Read-Only Files.
Why would you suspect so?
Whatever operating system or file system you are using it ends up reading and writing blocks to wherever it likes on the SD.
The SD card has no idea what file system you are using.
I am currently using ARM boards running Linux that have a small FAT and a large EXT3 partition. No problem.