SD card longevity


It seems like the SD card I have been using for source code backups for the past 2 years has died... Files are disappearing or getting corrupted, etc.

When I tell Windows to check the disk and scan for bad sectors, it returns almost immediately and says everything's fine, but the problems reappear. (In fact the disk check is so fast that it couldn't possibly have checked all the sectors!)

I bought a couple of cheap USB memory sticks to use for the time being; I'll have to find out if it's really the SD card or the card reader that's broken.

What I'm wondering is: what are your experiences regarding SD card longevity? I expect that in a calculator, PDA, or even a camera, the cards get written to a lot less than the several megabytes a day of backups that I tend to save -- but how long do they last? (How long are they supposed to last?)


- Thomas


The memory chips used vary in their quality grade, so if you buy the cheapest stuff, don't expect to find a pot of gold at the end of the rainbow
I'd highly suggest to use SanDisk (Kingston and a handful of other A-grade brands are fine as well though I'd suggest to stick to SanDisk); they are market/technology leader not without a reason.

The Flash-drives are - in my opinion - not really suitable as a HDD replacement, depending on the manufacturer, the number of write cycles is limited. Cheap stuff probably only hast 10k cycles until errors appear. 10k sounds a lot, but it isn't - the directory data is stored at a certain offset and each time you write (or erase) data, the directory is updated; so it's only 10000 files written or deleted until the drive fails. A-Grade chips (Samsung etc.) will last much longer, probably 10-100x as many write cycles.

There certainly is a reason for only offering 1 year of warranty on cheap stuff or lifetime on the expensive stuff.


Mine's a Kingston card -- I guess you're right about file copies pounding the directory entry on disk. I also suspect that the Linux driver is particularly nasty in this regard -- that would explain why copying large files or directory trees to the SD card takes so much longer under Linux than under WinXP.

Maybe I should dust off my Zip drive. I never lost so much as a bit with that thing. Bit too bulky for my pants pocket, though. ;-)

- Thomas


Part of the SD spec is something called "wear leveling". This attempts to spread writes out to previously unused physical sectors and maps them to their proper logical sector number. Properly implemented, you wont wear out a fixed directory sector. The spec and flash chips also supports bad block replacement.


Hello Thomas,

The CF card of my PDA began to have corrupt files after about one and a half year of intensive use. It was a SanDisk. At a point it wouldnot even be recognized by the PDA. I had it checked under Windows XP and got nothing: the card was oK. But then I used Windows 98's Scandisk. This time I did find bad files/sectors. Scandisk fixed the errors.

When I plugged the card back into the PDA, it was recognized. The card has worked like a charm since then.

I would also recommend SanDisk. And an older verion of ScanDisk and Defrag


Both the Win98 version of ScanDisk and Norton Disk Doctor seem to
be able do a thorough check of MMC/SD cards.

I have my doubts as to the usefulness of defragging the card
though. My impression is that physical addresses are remapped to
new logical addresses by the card itself every time that it's
written to. Anyway, it's not as if a head has to be physically
moved to a track or it has to wait for a particular sector to
rotate under a head.



Now that I've thought about this a bit more, utilities such as MS
ScanDisk and Norton Disk Doctor probably do a good check when
doing a read-only test, but perhaps not so good for a read-write
test. Such utilities presumably work a (logical) cluster (or
perhaps sector) at a time, but it seems to me that with the card's
wear-leveling remapping the blocks when it writes, the next
logical cluster isn't necessarily the next physical cluster.
What's more, when a cluster is marked as "bad" in the FATs, that
would be the logical cluster, and which physical sectors that maps
to would change because of the card's wear-leveling.

On the other hand, Juan reports that ScanDisk was able to fix his
CF card. Perhaps CF cards don't do any wear-leveling? Or maybe
attempting to write to (or read from) bad areas caused the card to
"notice" the defects and map them out?

Regarding defragging, it seems to me that this typically writes a
lot of clusters, and given that writing eventually "wears out" the
flash memory, may actually do more harm than good.



I have ruined a couple of SD cards under Linux already. From then I never use them running Linux.
I could recover them by formatting under windows but not under Linux.



I tried timing read and write speed, this time using a 256 megabyte BTC USB memory stick. Under Linux, read speed was close to the rated maximum of 8 Mb/s, but write speed was only about 1/20 of the rated maximum of 5 Mb/s.

This makes me suspect that the Linux USB storage driver writes small logical blocks, instead of grouping them into a physical block before writing. This approach is probably fine on hard disks that use caching internally anyway, but SD cards perform the write operations immediately. If the Linux driver writes 512 byte blocks, while the card has 8192 byte blocks, that would cause 16 times as many writes as necessary to occur -- wearing the card out 16 times faster than expected.

The SanDisk "Wear Leveling" white paper actually warns about just this scenario. I guess the Linux USB storage drivers still need some work... Maybe I'll ask around on the Linux forums -- but in the meantime, I'll just try to avoid writing large files to SD cards under Linux, and try to do such tasks under Windows as much as possible.

- Thomas


Also see this

SanDisk MultiMediaCard and Reduced-Size MultiMediaCard Product
. It's for MMC cards (which work fine in the 49g+)
instead of SD cards, but I suppose that they'd be very similar. It
covers 32MB through 256MB cards and was last revised in May 2004.
How much other manufacturers' and newer cards would differ, I
don't know.

Anyway, it says that "erase groups" are 32 sectors (16384 bytes)
long, which suggests to me that to maximize life for these cards,
the cluster size should be a multiple of 32 sectors.

If your card size can be formatted with the desired cluster size
with either FAT16 or FAT32, then the only advantage that I see to
FAT32 is that the root directory would have a variable number of
clusters instead of a fixed number of sectors, and FAT16 has the
advantage of smaller FATs.

To get a choice of file systems and cluster sizes, you may have to
run the FORMAT command from the command line instead of the GUI,
or use a utility other than the operating system's built-in FORMAT



I used a SanDisk card with my 49G+ and it gave me trouble. I could copy only between 1 and 4 files to it before everything would become corrupted. I traded it in for a Kingston, which has worked fine for me. So, I guess I'll have to be the naysayer that recommends against SanDisk.

In fact, now that I think back to that episode a little more, I looked up some reviews of that product (on Amazon and elsewhere), and I noticed a lot of people were complaining about incompatibilities with certain products.

Possibly Related Threads...
Thread Author Replies Views Last Post
  PCMCIA SD adapter for 200 LX? wildpig 4 682 08-27-2012, 08:20 AM
Last Post: Bill (Smithville, NJ)
  HP41 Card Reader not Pulling Card Colin Verrilli 14 1,537 07-29-2012, 05:53 PM
Last Post: Randy
  Editing HP-50G SD Card elements on a Mac Matt Agajanian 2 530 03-09-2012, 05:01 PM
Last Post: Matt Agajanian
  50G SD Card port problem Matt Agajanian 7 867 03-09-2012, 02:20 PM
Last Post: Matt Agajanian
  calculator longevity bill platt 30 2,819 10-11-2011, 06:04 PM
Last Post: Jeroen Van Nieuwenhove
  Offer of rides between SD airport and conference hotel Brian Walsh 3 557 09-21-2011, 05:16 PM
Last Post: Howard Owen
  HP 50g SD card reader problem JJB299 3 591 08-22-2010, 12:45 AM
Last Post: Vieira, Luiz C. (Brazil)
  HP 50G says the SD card is write protected Daniel Perry 4 610 07-07-2010, 10:54 AM
Last Post: Tim Wessman
  HP50G SD card is popping out Patrick Rendulic 7 796 12-02-2009, 04:59 PM
Last Post: Mike Morrow
  Will a micro sd card fit Hp 50g? ferroburak 6 917 11-24-2009, 10:17 AM
Last Post: Brian Walsh

Forum Jump: