gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Life of micro SD card

#135061 - lilou - Thu Jul 19, 2007 8:40 pm

The micro SD cards are not robust.

If you write on them intensively, you reduce their life dratiscaly.

I don't known if it's linked to the hardware (DS or micro SD Card) or to the software. I just known that the number of erasing cycle is limited.

Do you known on which C functions the erasing cycle is started-ended ?

Is it possible to shutdown (power-off) the card power in order to protect it like the USB shutdown on PC ?

Thank in advance


Last edited by lilou on Thu Jul 19, 2007 10:32 pm; edited 1 time in total

#135064 - Lynx - Thu Jul 19, 2007 9:55 pm

Quote:
I just known that the number of erasing cycle is limited


Limited to what? 10,000 or 100.
_________________
NDS Homebrew Roms & Reviews

#135068 - lilou - Thu Jul 19, 2007 10:31 pm

Quote:
Limited to what? 10,000 or 100.


Read / Write cycles over 100,000 times for the transcend mini SD 2G

#135075 - spinal_cord - Fri Jul 20, 2007 12:30 am

Then surely for 'normal' use it would last a couple of years? I have never had any problems with any memory cards/devices dieing because of over use.
_________________
I'm not a boring person, it's just that boring things keep happening to me.
Homepage

#135077 - calcprogrammer1 - Fri Jul 20, 2007 12:34 am

I have some old 128MB SD cards I got like 3 or 4 years ago that still run fine today. I also have some newer SD cards that were ruined by my STUPID mp3 player that likes to write bad data and ruin cards. I've never had a card just die of overuse though.

The chances of a card dying of write cycles is probably near none, considering that many cards die of other stuff before that, like formatting errors, stupid devices, or other stuff like that.
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#135088 - tepples - Fri Jul 20, 2007 4:13 am

Better yet, most CF and SD cards' memory controllers have some sort of built-in wear levelling.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#135100 - Lynx - Fri Jul 20, 2007 5:22 am

Quote:
If you write on them intensively, you reduce their life dratiscaly.


The only way I can see that coming into play is if you tried to use it as a swap partition for an OS on the DS.
_________________
NDS Homebrew Roms & Reviews

#135143 - OOPMan - Fri Jul 20, 2007 11:46 am

Lynx wrote:
Quote:
If you write on them intensively, you reduce their life dratiscaly.


The only way I can see that coming into play is if you tried to use it as a swap partition for an OS on the DS.


Thank goodness we don't have an MPU, eh? No need to worry about swap partitions for us :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...

#135146 - lilou - Fri Jul 20, 2007 12:24 pm

tepples wrote:
Better yet, most CF and SD cards' memory controllers have some sort of built-in wear levelling.


I read some papers on the wear levelling and this technique is applied on SSD. For micro SD, it seems that it's to costly.

For recall, the Wear-levelling attempts to work around the write limitations by arranging data so that erasures and re-writes are distributed evenly across the medium. In this way, no single sector prematurely fails due to a high concentration of write cycles.

Extract from an article : If the application writes at a speed of 1KB/sec, the expected lifetime is 2,4 days.

So, we can limited the effect by "good coding".

PS : since i start to develop (four month already) on DS, i have now 2 Transcend micro SD dead card. Last week, i buy a SanDisk, i hoppe it's more reliable.

#135176 - Lynx - Fri Jul 20, 2007 5:25 pm

Quote:
PS : since i start to develop (four month already) on DS, i have now 2 Transcend micro SD dead card. Last week, i buy a SanDisk, i hoppe it's more reliable.


But, how do you know that is from read/write cycles? I have a dead MicroSD card that was used maybe 20 or so times.. I'm starting to wonder if our slot-1 devices didn't receive the proper testing they should have, and are destroying these cards.
_________________
NDS Homebrew Roms & Reviews

#135189 - phonymike - Fri Jul 20, 2007 7:39 pm

if any memory card has died after 20 uses, return it and get another. there is a failure rate on production products (like 1%-2%) as in not every one off the line is perfect, that's why there are warranties. I have a microsd in my cell phone, transfer mp3s and pictures to it all the time. also a microsd in my mp3 player. I've written stuff to these things hundreds of times, and they can withstant pry 100,000 full erase and write cycles before they start to show signs of failure.

#135191 - Lynx - Fri Jul 20, 2007 8:33 pm

As for warrenty? Not really worth it.. I only paid $10 for the Kingston 1GB MicroSD that died.. it'd be more hustle (and money for shipping) then it is worth. I'll just order another one. My point is, I don't think it is a MicroSD issues.. I'm saying I believe it might be a hardware issue.

And I think we might need to put together some kind of running total of killed SD cards and the products that killed them. This topic is the exact reason I started this thread because I know of 3 other people that had similar experiences. I have a feeling there will be a lot more. If we can at least narrow it down to which products are destroying the most MicroSD cards, we can try to steer clear of those products. Or, let the manufacturers know what their hardware is doing.
_________________
NDS Homebrew Roms & Reviews

#135232 - josath - Sat Jul 21, 2007 2:52 am

assuming perfect wear-leveling, on a 1GB card:

1KB/sec will take

1024*1024 / 60 / 60 / 24 = 12.1 days to write the entire card once

12.1 * 100,000 writes before failure = 3325 years

now if you write 1KB/sec (ie the same sector over and over), with NO wear leveling:
100,000 writes / 60 / 60 = 27.7 hours before failure

quite a difference there, eh?

#135274 - DragonMinded - Sat Jul 21, 2007 6:29 pm

The whole idea that normal use of a card can destroy it is complete BS. If you are intentionally trying to kill a card by writing to the same sector over and over, sure it will die. I have the same 64MB CF card that I've been developing homebrew on for two years now. On an active day, I'll swap it out and copy a new .nds 50+ times. Add that to the writing done in my apps, and the fact that I dev several times a week, and then realize it's two years old and gives me no trouble. It's also outlasted a GBAMP so far. People need to stop being paranoid about stuff, these cards are designed to last years.
_________________
Enter the mind of the dragon.

http://dragonminded.blogspot.com

Seriously guys, how hard is it to simply TRY something yourself?

#135351 - Lynx - Sun Jul 22, 2007 6:00 pm

Same here Dragonminded. It's not the media.
_________________
NDS Homebrew Roms & Reviews

#135367 - tepples - Sun Jul 22, 2007 8:24 pm

DragonMinded wrote:
The whole idea that normal use of a card can destroy it is complete BS. If you are intentionally trying to kill a card by writing to the same sector over and over, sure it will die.

Is there a way to implement real-time automatic save that doesn't wear out a sector?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#135369 - josath - Sun Jul 22, 2007 9:10 pm

tepples wrote:
DragonMinded wrote:
The whole idea that normal use of a card can destroy it is complete BS. If you are intentionally trying to kill a card by writing to the same sector over and over, sure it will die.

Is there a way to implement real-time automatic save that doesn't wear out a sector?


how often do you need to save? even if you saved every 5 minutes, and you played 6 hours per day, 7 days a week, 365 days a year, it would take you roughly 4 years before writing 100,000 times to the same sector. And this assumes no wear-leveling at all.

(12 times per hour) * (6 hours per day) * (365 days per year) = 25,632 writes per year

#135380 - tepples - Sun Jul 22, 2007 11:18 pm

josath wrote:
tepples wrote:
DragonMinded wrote:
If you are intentionally trying to kill a card by writing to the same sector over and over, sure it will die.

Is there a way to implement real-time automatic save that doesn't wear out a sector?

how often do you need to save? even if you saved every 5 minutes

Off by at least an order of magnitude. I don't want the player to be able to get out of a sticky situation by just pressing undo or to reroll a random event 1000 times until it is most advantageous. Ever played NetHack or other roguelikes, or Diablo II in hardcore mode?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#135383 - Rajveer - Mon Jul 23, 2007 1:26 am

tepples wrote:
I don't want the player to be able to get out of a sticky situation by just pressing undo or to reroll a random event 1000 times until it is most advantageous.


You're right, games are more fun without the temptation of quicksave, not many realise that!

#135389 - josath - Mon Jul 23, 2007 1:41 am

tepples wrote:
josath wrote:
tepples wrote:
DragonMinded wrote:
If you are intentionally trying to kill a card by writing to the same sector over and over, sure it will die.

Is there a way to implement real-time automatic save that doesn't wear out a sector?

how often do you need to save? even if you saved every 5 minutes

Off by at least an order of magnitude. I don't want the player to be able to get out of a sticky situation by just pressing undo or to reroll a random event 1000 times until it is most advantageous. Ever played NetHack or other roguelikes, or Diablo II in hardcore mode?


You could do what nethack does, delete the savegame when they load, and only allow saving when quitting.

#135391 - tepples - Mon Jul 23, 2007 1:57 am

josath wrote:
tepples wrote:
josath wrote:
tepples wrote:
Is there a way to implement real-time automatic save that doesn't wear out a sector?

how often do you need to save? even if you saved every 5 minutes

Off by at least an order of magnitude. I don't want the player to be able to get out of a sticky situation by just pressing undo or to reroll a random event 1000 times until it is most advantageous. Ever played NetHack or other roguelikes, or Diablo II in hardcore mode?

You could do what nethack does, delete the savegame when they load, and only allow saving when quitting.

This is OK for desktop computers, which have a reasonably stable power supply and a reasonably protected Big Red Switch. DS has neither, and players would not appreciate losing months of work. Unlike in a roguelike, there is no death in what I envision, but I desire other things to be permanent.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.