LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-20-2009, 07:58 PM   #1
plebetan
Member
 
Registered: Jan 2009
Posts: 31

Rep: Reputation: 15
flash ram wearing/durability/life


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?
 
Old 06-20-2009, 08:35 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
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.
 
Old 06-20-2009, 09:51 PM   #3
plebetan
Member
 
Registered: Jan 2009
Posts: 31

Original Poster
Rep: Reputation: 15
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?

**edit** yeah, i meant write/erase sry.

Last edited by plebetan; 06-20-2009 at 11:20 PM.
 
Old 06-20-2009, 10:23 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Just to reiterate it is write/erase cycles that limit the life span of flash memory.
I believe that sd memory contains wear leveling logic.
 
Old 06-20-2009, 11:26 PM   #5
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
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.
 
Old 06-21-2009, 10:57 AM   #6
plebetan
Member
 
Registered: Jan 2009
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by AwesomeMachine View Post
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?
 
Old 06-21-2009, 11:19 AM   #7
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ram Disk to enhance flash drive's life; What files do I need to worry about? e1000 Linux - Server 2 04-13-2008 02:02 AM
LXer: Examining the XO Activities and Durability LXer Syndicated Linux News 0 01-26-2008 09:50 PM
Best practices to prolong the life of flash drives? ewolf Linux - Hardware 3 12-05-2007 01:14 PM
DVD durability question colinstu General 5 08-28-2007 11:30 AM
Life time of USB compact flash satimis Linux - Hardware 4 03-17-2006 02:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration