Naked Science Forum

Non Life Sciences => Geek Speak => Topic started by: Atomic-S on 08/03/2012 06:00:26

Title: What is the longevity of data on a flash memory device?
Post by: Atomic-S on 08/03/2012 06:00:26
I have this memory device that is to be plugged into the USB port, and then acts like a drive. It is good for 16 gigabytes. I got this because of problems with software associated with my prior backup hard drive. My question is, not knowing how this works, how permanent is data written onto this new device? Recently I had a battery go out on my motherboard, resulting in loss of certain functionality that has not yet been fully restored, and I wonder if this USB memory device operates in a similar manner, with an internal battery that will eventually go bad, and if when it does, the device self-erases. If it does have a battery, there appears to be no way to replace it. It has a 5 year warranty, which, however, does not assure that the data will still be there the 6th year, which may be of interest. If this device does in fact self-erase after 5 years, maybe I need to be thining about CD-Rs or similar media instead.
Title: Re: What is the longevity of data on a flash memory device?
Post by: CliffordK on 08/03/2012 07:05:50
I presume they work like an EPROM, and thus don't need a battery.  Certainly the micro-SD flash devices are small enough that it would be difficult to fit in much of a battery.

Like any drive, apparently they can fail spectacularly with use.

However, I'm not seeing any information about "shelf-life".  Say you used it only once every couple of years.  Would it be possible they could last indefinitely?

I would assume that for best longevity, you should keep them stored in a dessicated non-corrosive environment.  Also keep in mind that it is mighty easy to loose the little buggers.  What about EMPs?

I got a good price on a generic 256 GB flash drive off of E-Bay.
The first thing I did once I got it home was to try out a 100% write, then read-back  drive verification.  The thing is slower than molasses!!!  In a couple of hours I should find out whether I got a good deal, or another piece of electronic scrap.

But, if you are tempted to buy generic Flash drives on E-Bay, then it isn't a bad idea to do a 100% integrity test, otherwise your data could be toast much sooner than you would expect.
Title: Re: What is the longevity of data on a flash memory device?
Post by: graham.d on 08/03/2012 08:51:08
Are you talking about a memory stick, a thing that looks like a disc unit  or something that calls itself a solid state drive (ie something without moving parts)?

A USB memory stick is based on flash memory. It's lifetime depends on lots of factors. It may be a high quality unit or it may be based on technology that uses Multilevel Cells (MLC) and is not the higher reliability two level, NOR based memory devices. The durability will depend on the associated controller chip that is packaged with the flash memory. The controller should have sophisticated "wear levelling" algorithms and Error Correction software. Flash memory deteriorates with the number of write cycles (reading is not such an issue) so the wear levelling moves the actively used locations of memory to different addresses so as to average the use of the memory bits. Depending on usage this can extend the life from a few days to several years!

Anyway, it will be OK for backup storage and should last several years used like this. If you try to use it as a normal disc store or, worse, as residence for your operating sytem it won't last long at all - a few days in the latter case I suspect.

The new solid state disc drives can also be based on either sort of flash memories. This is a cost-lifetime/reliability trade off and may not be obvious unless you carefully read the specification.

If it looks like a disc drive then it probably is a disc drive.

In all cases the storage should be non-volatile and not need batteries. Power for operation is supplied via the USB port.
Title: Re: What is the longevity of data on a flash memory device?
Post by: CliffordK on 08/03/2012 18:14:25
I really don't see what would go bad in the cards if they are kept unplugged from the PC, and just used occasionally.  However, I would avoid appending to a drive that was the only location for the data.  It never hurts to do random file verification.

I'm seeing notes that antistatic bags don't protect from EMP.  Aluminum foil does.  But, plastic + desiccant can help keep components dry.

As mentioned above, I just bought 2 "generic" 256 MB flash drives off of E-Bay.  Too Cheap.   [:-\]

I just got done testing the drives using a utility, f3v2.  There are perhaps better Windows compatible utilities for checking the drives, but this gave me the data that I needed.

Data OK: 3.87 GB (8113478 sectors)
Data LOST: 246.10 GB (516110266 sectors)
Corrupted: 246.10 GB (516110266 sectors)

So, the true capacity of my drive was just over 1% of the advertised value.   [xx(]
I've requested a refund from the seller.

TEST E-BAY GENERIC FLASH DRIVES BEFORE USING THEM FOR CRITICAL ARCHIVES.

What happens on the "fake" drives.  They appear to write the files.  But they just don't.  Or, in my case, it would probably work for 3.87GB, (even fragmented files?), but going over that capacity, can corrupt the data already on the drive.
Title: Re: What is the longevity of data on a flash memory device?
Post by: Geezer on 08/03/2012 18:49:43

I'm seeing notes that antistatic bags don't protect from EMP.  Aluminum foil does. 
 

I wouldn't count on it. The field radiated by the induced current travelling through the foil can be just as bad as the original pulse.
Title: Re: What is the longevity of data on a flash memory device?
Post by: Atomic-S on 14/03/2012 04:44:40
Quote
Data OK: 3.87 GB (8113478 sectors)
Data LOST: 246.10 GB (516110266 sectors)
Corrupted: 246.10 GB (516110266 sectors)

So, the true capacity of my drive was just over 1% of the advertised value.   
Thanks for the warning concerning quality. I got mine from an actual store, and so far it seems to be working.
Title: Re: What is the longevity of data on a flash memory device?
Post by: SeanB on 14/03/2012 18:00:29
Fake flash drives on Fleabay.......... All to common. Best is to note Caveat Emptor, and note that the largest is currentlly 64Gb, and is correspondingly expensive. The drives do have a definite life, generally about 100 000 writes, or to be more fair 100 000 files copied to the drive ( the FAT gets written for each file written or read on the drive, so this particular few sectors gets heavy use, and will fail first) before they start getting flaky. If not plugged in and capped with the cap ( or in the little plastic box for SD cards) they should hold data for at least 5 years. 10 more likely, but these is no real data yet on life of these units, just the data about write endurance. Older flash devices have lasted over 10 years, and the newer ones should have similar life. the old EPROMS would hold data for at least 25 years, but use a much larger cell, and much thicker oxide insulation. EEPROM cells use a similar method, but the life will be less, as the die uses physically smaller storage units, and these have less stored charge to begin with.

The life is still unknown, but a device that is used only once from purchase is more likely to last longer before becoming a device with read errors, as compared to a device that has had thousands of random writes to it.

Just remember that they do not fail as unreadable always, mostly they get stuck bits or changed bits. This is harder to detect, you need to store each file with a checksum for the data. Thus you really need to store the info 3 times on 3 different physical media devices. This enables you to both detect single errors, but also to correct multiple errors.

If you ever read the Harry Seldon Foundation series by the late Isaac Asimov you will remember the Imperial Library where the data is unreadable, but the indices are legible, referring to unreadable knowledge that is degraded beyond reading. All due to the indices being copied without the data, which degraded to uselessness.
Title: Re: What is the longevity of data on a flash memory device?
Post by: graham.d on 15/03/2012 09:25:16
I concur with Sean that there are likely to be fairly dodgy systems being sold and there is need to read the spec carefully. The major manufacturers should be up-front about the product limitations though. There are already flash based drives being made for high reliability applications in computers. These are usually built with NOR flash (1 bit per cell); this is rather than Multi Level (MLC) flash which has multiple bits per cell and consequently smaller, cheaper and less reliable for reasons Sean alluded to (a smaller change in the held charge can change the bit state). All drives will utilise a controller chip which handles Error Detection and Correction (for both soft and hard errors) invisibly to the user and also "wear levelling" which effectively moves the addressing around so as to even out the writing over the flash chips to avoid a few cells getting worn out.

The drive to get such systems is clear - they are faster, lower power and much smaller than disc drives and, will ultimately, be cheaper and more reliable I think, though it is impressive how much disc drives have improved over the years and continue to do so. With the growth in mobile computing, especially in phones and pads, there is really little choice but to rely on this technology and, with current market trends, the lifespan of any product does not seem to be of prime value compared with its feature set.
There is a huge incentive to get flash storage more reliable as well as to get higher density and lower cost and there are many ways being expoited to overcome any inherent limitations.
Title: Re: What is the longevity of data on a flash memory device?
Post by: Geezer on 15/03/2012 19:35:31
I suppose an OS and file system can be structured to minimize excessive writing in flash and focus it on RAM only. That's certainly not the case with VISTA! It thrashes my disk to bits.
Title: Re: What is the longevity of data on a flash memory device?
Post by: graham.d on 15/03/2012 20:58:40
I think this may well be the way OS's will be written in future; certainly for mobile applications. Actually they may well be doing some of this now - I don't know.

I'm still using XP at home (Windows 7 at work) and it spend ages after I start it up thrashing the disc. I have Sophos anti virus s/w and it runs a program called SavService which frequently takes 100% cpu. I checked on the web and loads of people complain but nothing changes. After startup it can take 15 minutes before I can get Google on the screen!
Title: Re: What is the longevity of data on a flash memory device?
Post by: Geezer on 15/03/2012 23:18:17
MS is, as usual, asleep at the wheel.

Meanwhile, Intel is crapping its pants. if they don't look out, ARM will clobber them from a great height.
Title: Re: What is the longevity of data on a flash memory device?
Post by: RD on 16/03/2012 02:59:26
... Sophos anti virus s/w and it runs a program called SavService which frequently takes 100% cpu. I checked on the web and loads of people complain but nothing changes. After startup it can take 15 minutes before I can get Google on the screen!

Try Microsoft's free anti-virus anti-malware ... http://en.wikipedia.org/wiki/Microsoft_Security_Essentials
it uses less resources than similar programs I've tried.

Alternatively try running a lightweight Linux system from a CD / DVD / USB , e.g. http://www.browserlinux.com  or http://puppylinux.org ,
 [I'm posting this via Puppy Linux with FireFox , booting from USB stick, from startup to internet takes less than a minute]   
Title: Re: What is the longevity of data on a flash memory device?
Post by: Geezer on 16/03/2012 05:11:09
MSE is a lot better than a lot of other anti-virus s/w, but it still takes over my machine, usually at the most inconvenient times.

I'm about ready to completely disconnect my Windoze machine from the Internet and use it only to run standalone applications. Because it tries to do everything, it's ridiculously "top-heavy". Most of the time, all I want to do is visit a couple of websites. I don't even use a MS mail program.

MS better wake up, or it's really going to get its butt kicked. If you only want to bruise the Internet, you don't need no stinking Windows!

(Sorry, I didn't mean to shout.)
Title: Re: What is the longevity of data on a flash memory device?
Post by: CliffordK on 16/03/2012 20:54:18
Top-heavy?

I don't know.  Personally I think there is a bit of a "conspiracy".   

Encourage people to keep adding in "add-ons" because it makes the machine safer/better.  But, in reality, the new updates take a toll on the machine's performance.

If we were all running 15 year old computers, would we be clamouring to buy the latest Windows 8?  No, we'd probably still be happy running Windows 95.  Or, perhaps upgrading to Windows 98 to get the USB support.    Everyone in both the hardware and software business wins by convincing people to trade in their computers every 3 years or so.

As far as "alternatives", I believe that Linux is a very viable OS.  However, it has been sitting at 90% usability for the last 5 years.  Prettier pictures and whatever, but some of the core stuff just doesn't go away.  For example, every Kernel update crashes my video driver.  And, then I'm knocked out of X-Windows.  Have to restore the video driver using pure shell-script, then I'm back with X-windows again. 

People just wouldn't put up with that in the Windows/Mac world.

I like the OpenOffice/LibreOffice, but I have discovered some things like the macro & VB capabilities in MSFT programs far outperform the Linux alternatives.

One of the more annoying things for me is the "snap-to" functions.  Move a window out of the way to the corner of the screen, and suddenly it is covering the whole screen.  [xx(]  In Linux there are at least 3 different controls for the window snapping function, and it certainly isn't intuitive on how to turn them off.  In Windows, 30 seconds, and one finds the ONE place that controls that annoying functionality.

I decided to do a dual-screen setup in Linux, Portrait + Landscape.  It is possible, but cumbersome.  Windows, No problem, although it still could be a little easier.

Of course, vendor support is spotty at best.
Title: Re: What is the longevity of data on a flash memory device?
Post by: Atomic-S on 27/03/2012 05:13:10
I used to run Windows 2000, and it worked well initially, but as time went on, there were increasing problems. Eventually I learned that the automatic updates were making my machine obsolete. I had to replace the machine.
Title: Re: What is the longevity of data on a flash memory device?
Post by: Geezer on 27/03/2012 05:35:52
I used to run Windows 2000, and it worked well initially, but as time went on, there were increasing problems. Eventually I learned that the automatic updates were making my machine obsolete. I had to replace the machine.

I think you are correct. The software "corrodes" as more and more maintenance patches are applied. Eventually, the code becomes such mess that nobody can even remember what the original grand plan was, and nobody really wants to work on it.
Title: Re: What is the longevity of data on a flash memory device?
Post by: imatfaal on 27/03/2012 09:57:14
I used to run Windows 2000, and it worked well initially, but as time went on, there were increasing problems. Eventually I learned that the automatic updates were making my machine obsolete. I had to replace the machine.

Atomic - if you still have the machine download a copy of some flavour of linux.  I had exactly the same happen to two machines - both of which now run Fedora 16.  You really don't need to be an ubergeek to run linux anymore-  I really don't know much about computers,  even though my first job was a network and computing specialist. 

You don't get the flashy and glossy programmes so much - I miss the beauty of itunes, and the overwhelming power of office; but the replacements are pretty damn good.  Many people even prefer the layout of libre/open office (it has old fashioned menus) rather than the ribbon based msoffice.
Title: Re: What is the longevity of data on a flash memory device?
Post by: evan_au on 13/07/2012 13:41:41
Flash chips use electron tunneling to place a charge into an insulated region in the memory cell.

This charge in a memory cell can leak out over time - a process that happens faster at higher temperatures. So store the flash drives in a cool location.

The charge in cells can also be overwritten by charges injected by cosmic rays - storing them in the basement might provide a bit of protection (an older problem where RAM chips suffered bit errors from decay of radioactive elements in the packaging was solved by careful material selection).

It may be wise to read the entire flash chip every so often - if the controller does error correction, it will correct individual memory cells that have lost their charge. If too many cells have failed, the file won't be readable (even after several attempts), and you may need to get another copy of the file from your computer.
Title: Re: What is the longevity of data on a flash memory device?
Post by: graham.d on 22/07/2012 10:27:46
Theoretically quite right Evan-au but the main issue with flash memory is the finite number of writes rather than the decay of stored data. At least this is so on higher reliability SLC flash rather than the lower cost per bit MLC flash.

I am not sure that storing your flash drives in the basement would enhance protection from Cosmic rays too much; at least, not unless you owned a very deep mine :-) The Dynamic RAM soft error problem you alluded to was indeed down to the materials used in some packages which had traces of radioactive materials. The worst contributor was in the glass seal used in CERDIP packages which, being around the edge of the package, meant that the alpha particles emitted crossed the depletion region under the storage capacitor at the optimal angle to generate the maximum number of electron-hole pairs too. The solutions were originally to coat devices (inside the package) with Polyimide which blocked the alphas. Some plastic fillers also had alpha emitters but this has been eliminated now and Cerdips are not really used any more. Alphas do not have much penetration so, unless the source is in the package, do not cause problems. Cosmic rays have already penetrated the earth's atmosphere so an extra floor won't make a lot of difference. The capture cross section is also quite low, even if not negligible. A further point is that flash is less susceptible than DRAM to leakage due to cosmic ray impacts because the data is stored on a polysilicon gate which is isolated by Silicon dioxide. There is no associated depletion region where elecron-hole pairs can be created to result in leakage. There can be damage done to the thin oxide and a conduction path created through the oxide by a cosmic ray, but again the cross section is quite small so the event is fairly rare.

You are right about it being good to do occasional reads. The controller chip will provide error correction and restore corrupted data providing there is not too much. I am not sure what would be an optimum time delay between taking such actions though. As reading the cells is fairly benign I guess it does little harm to do it more often than optimum anyway but I'm guessing that something like monthly is adequate. As the flash gets older there will be cells that die completely so that it can eventually become uncorrectable though. On a rarely written flash this time will be quite large - probably many tens of years. On a very heavily written to flash this time can be very low though, if a high reliability SLC flash with wear levelling, it will still be some years; without wear levelling and with MLC flash, it can be just hours.
Title: Re: What is the longevity of data on a flash memory device?
Post by: SeanB on 22/07/2012 11:32:24
I did test write endurance of an old 1G flash drive by using it as a boot drive and a swap partition on my EEEPC. Lasted 2 days at idle before it complained about swap being corrupt. Took it out and replaced with a 512M SD card ( was on sale ultra cheap, and is a boon for older cameras that do not have SDHC ability available) and still have 4 sealed in package around. Now runs Puppy Linux happily.
Title: Re: What is the longevity of data on a flash memory device?
Post by: nicephotog on 27/10/2012 07:29:01
I just put 400 GB of data on a "1TB portable hard drive PGP", i have 40GB in my pocket and info in there ranges from current to must have documentation and odd info i have collected intermittently. The flash drives do appear to be OK without use after six months but further i don't know. The docs and progs i backed up are the current on my computer for both Linux(s) and Win systems for the past ten years. data on the flash are my essential progs and documentation e.g. Apache tomcat variants , j2se docs j2ee docs other languages and info such as govt. depts. info b&w films such as shadow of a doubt , old horror b&w or pet cemetry most is docs and essential progs.
The 1TB i will clone to another for direct use.

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.
Back