Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've been trying to find out the mttf/mtbf of a flash ram storage device and it seems that it isn't measured in time but in number of reads/writes/erases. Some sources say that most flash ram is good for about 100,000 write/erase cycles, some of the sites that sell these devices specify lifetime in read/write cycles. the wikipedia article on flash ram seems to state that only writing or erasing flashram blocks cause it to wear. does reading not cause any kind of wear on a flash device?
Reading does not cause wear to flash memory.
Typically a single cell of memory has a lifetime of 100,000 write/erase cycles but pen drives have special wear leveling circuitry to extend the entire life of the drive to +1,000,000 cycles. Which means years of writing under normal usage.
so, i guess the sites(vendors mostly) that spec read/write cycles are just mistaken and mean write/erase. Does anybody know if SD cards implement wear leveling? In that case, would wear leveling be implemented on the card or on the adapter that reads and writes to it?
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
SD cards do use wear leveling. If you buy name brand memory, it is usually guaranteed for life. You get what you pay for. Unless you try to run an operating system from flash, you aren't going to have enough writes to wear out a good flash memory card. And, the only thing that gets erased on a data flash drive is the first character in the filename, when you delete a file.
Flash drive wear is a concern with solid state flash hard drives, not so much with SD cards and pen drives.
SD cards do use wear leveling. If you buy name brand memory, it is usually guaranteed for life. You get what you pay for. Unless you try to run an operating system from flash, you aren't going to have enough writes to wear out a good flash memory card. And, the only thing that gets erased on a data flash drive is the first character in the filename, when you delete a file.
Flash drive wear is a concern with solid state flash hard drives, not so much with SD cards and pen drives.
well, I occasionally zero out or write /dev/random data to my flash drives using dd for security purposes because files don't get fully erased like you said. What kind of wear might that cause?
At a hardware level, in order to write to a memory location, electrons must be tunneled through the insulating oxide layer and that requires a relatively high voltage, close to the level at which damage occurs.
Slowly 'wear' occurs and after a period, dependant on the voltage and temperature that particular cell is no longer capable of being flipped in state and, effectively, becomes read only memory, which isn't what you though you were buying.
At the level of the controller, some 'magic' is performed to distribute the writing of data around the cells of the device (i.e., there is a mapping between addresses at the cell level and addresses as seen by the OS and that mapping is varied), so that no individual cell sees massive numbers of writes while the rest of the device is unused. This wards off the premature failure that would otherwise occur.
Quote:
And, the only thing that gets erased on a data flash drive is the first character in the filename, when you delete a file.
Literally, as stated, that is correct. Or, at least, it is true in the case of at least one filesystem. I am not sure, for example, what happens if you are trying to run swap on an SD device (which could be a bit adventurous anyway, unless you have enough ram that swapping rarely happens).
However, if you want to re-use the memory area previously used by the now-erased data, you also have to erase and write to those data areas, subject, of course, to the re-mapping mentioned earlier. But, viewed at the cell level, if you want to use the memory cell, which you will do sooner or later, you will need to erase the existing data, if there is any.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.