maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   Virtual Memory - Wears down flash card? (https://talk.maemo.org/showthread.php?t=8930)

bholzman 2007-08-16 23:20

Virtual Memory - Wears down flash card?
 
Can setting up virtual memory on my flash card (e.g. on 770) wear down the card? Flash cards are specified to be good for a certain number of writes and I was wondering whether use of virtual memory in this way might be write intensive.

torx 2007-08-16 23:33

Re: Virtual Memory - Wears down flash card?
 
That's why I use Transcend SD cards! Lifetime support and super fast transfers!

(Note: This is not an advertisement)

SamAdam 2007-08-16 23:43

Re: Virtual Memory - Wears down flash card?
 
Quote:

Originally Posted by bholzman (Post 69086)
Can setting up virtual memory on my flash card (e.g. on 770) wear down the card? Flash cards are specified to be good for a certain number of writes and I was wondering whether use of virtual memory in this way might be write intensive.

it takes several hundred thousand writes afaik to damage it. that, and the card has build-in write balancing, so if you have a 2GB card, a 128 MB mem can be moved around a lot. And by the time it goes bad (few years), they will be so cheap that in the time you may have saved by having the virtual memory will have by far repaid the cost of a new card.

bholzman 2007-08-17 01:22

Re: Virtual Memory - Wears down flash card?
 
This memory moving - isn't it somewhat defeated if one has a lot of files (e.g. videos) on the card?

fanoush 2007-08-17 07:50

Re: Virtual Memory - Wears down flash card?
 
Quote:

Originally Posted by bholzman (Post 69103)
This memory moving - isn't it somewhat defeated if one has a lot of files (e.g. videos) on the card?

Most probably no. Wear levelling works on much lower level, it does not know which blocks are used by files and which are free.

From the pieces I've read here and there it looks like all flash card blocks are divided to groups and when writing specific block to the card, blocks in same group are reused in circular fashion. So let's say if block group has 100 blocks then every 100'th write rewrites same block. Life time of single block is approximately 100 000 writes and then recoverable errors (on low level, handled transparently for you) may appear. This should be good enough for many years.

But still if I understood it correctly it could help a bit if you move your swap file after some time (months?, year?). The best is to copy the .swap file to another one and then delete the previous one and rename new one to old name. This should result in blocks used for swap to be moved to different group somewhere else on the card.

nosam 2007-08-21 18:12

Re: Virtual Memory - Wears down flash card?
 
Quote:

Originally Posted by torx (Post 69088)
That's why I use Transcend SD cards! Lifetime support and super fast transfers!

You mean there is a lifetime warranty that will get u a new Transcend card when it wears out? Can u clarify this? I am afraid of using it this way because I cant afford a new one. thanks

SamAdam 2007-08-21 23:37

Re: Virtual Memory - Wears down flash card?
 
Quote:

Originally Posted by nosam (Post 70130)
You mean there is a lifetime warranty that will get u a new Transcend card when it wears out? Can u clarify this? I am afraid of using it this way because I cant afford a new one. thanks

again, by the time it wears out (maybe 5 years from now) you can have saved a dime a month and have enough money to buy a new one then.

nosam 2007-08-22 16:51

Re: Virtual Memory - Wears down flash card?
 
Thank you for your reply SamAdam. Can torx or someone else answer more directly my question about warranties:

"You mean there is a lifetime warranty that will get u a new Transcend card when it wears out? Can u clarify this? I am afraid of using it this way because I cant afford a new one. thanks

Does anyone have experience with a card actually wearing out and how long it took? I am trying to decide to use virtual memory or not. Thanks.

thel8elvis 2007-08-23 16:51

Re: Virtual Memory - Wears down flash card?
 
This will not answer your question about transcend, but try reading this

And also, consider products like the thousands of pmps that are all based on flash memory... have you heard of them 'wearing out' ?

Really, I don't think it's a valid issue to be concerned with.

henningspruth 2007-08-23 17:14

Re: Virtual Memory - Wears down flash card?
 
Quote:

Originally Posted by thel8elvis (Post 70647)
This will not answer your question about transcend, but try reading this

Excellent read - the summary is that for a flash-based storage accelerator in a server operating at the maximum theoretical write rate, the flash is expected to fail after 51 years.

Quote:

Originally Posted by thel8elvis (Post 70647)
And also, consider products like the thousands of pmps that are all based on flash memory... have you heard of them 'wearing out' ?

Really, I don't think it's a valid issue to be concerned with.

Well, music players probably are written to less than 10000 times over their total lifetime, a swap file in a general purpose OS sees somewhat higher usage ...

henningspruth 2007-08-23 17:20

Re: Virtual Memory - Wears down flash card?
 
Quote:

Originally Posted by nosam (Post 70130)
You mean there is a lifetime warranty that will get u a new Transcend card when it wears out? Can u clarify this? I am afraid of using it this way because I cant afford a new one. thanks

Their warranty conditions (http://www.transcendusa.com/Support/Warranty.asp) seem to be pretty clear. I'm pretty certain they won't invest the effort in proving that you "abused" the card in an unspecified fasion.

The question (for an N770) is more if MMC cards will still be in production, say, 5 years from today.

I have a related question: is there a cookbook for swapping to the MMC when the MMC is mounted as root?

bholzman 2007-08-23 17:32

Re: Virtual Memory - Wears down flash card?
 
I am not sure that article is helpful. First it is for flash hard drives and the size in the test was 64GB. Second, I looked up the durability of my Kingston 2GB MMC Mobile card - it appears to to be 10,000 writes per physical sector which is for multi level flash which I believe it is - otherwise it is 100,000 writes not millions as the article specifies.

Dom Queron 2007-08-23 17:49

Re: Virtual Memory - Wears down flash card?
 
This has been answered many times on these forums, and on the maemo website.

Even if continously writing on the same spot of the mmc card all the time, it will take you many years to wear it out in any noticeable fashion.

TA-t3 2007-08-27 11:21

Re: Virtual Memory - Wears down flash card?
 
There's a lot more to media writes than just file updates. Consider just 'atime', which is 'last time of access', a *nix filesystem mounted with default mount options will write to the disk every time you access a file, that is, when you read it. So you only have to keep reading the file, and you'll write to the disk. For FAT filesystems there are issues with the directory updates, I remember reading an article about flash card wear levelling a couple of years back (possibly on wikipedia), and it was pointed out that if it weren't for wear levelling you could easily reach the 100000 limit in a short time just because of FATs inefficient directory handling. (I didn't find this article when I searched on wikipedia right now, so it could be that I read it elsewhere, maybe handhelds.org)

Oh, and if your SD card is formatted as ext2 instead of FAT it's probably a good idea to mount it with the 'noatime' option. Very few programs need to know time of last access (as opposed to time of last update), so this will reduce writes as well as improve speed.

Milhouse 2007-08-27 16:13

Re: Virtual Memory - Wears down flash card?
 
Quote:

Originally Posted by TA-t3 (Post 71372)
For FAT filesystems there are issues with the directory updates, I remember reading an article about flash card wear levelling a couple of years back (possibly on wikipedia), and it was pointed out that if it weren't for wear levelling you could easily reach the 100000 limit in a short time just because of FATs inefficient directory handling. (I didn't find this article when I searched on wikipedia right now, so it could be that I read it elsewhere, maybe handhelds.org)

Maybe it was this article (164Kb pdf).

TA-t3 2007-08-28 10:44

Re: Virtual Memory - Wears down flash card?
 
Thanks Milhouse,
I think it was another article I read back then, but I suspect it was referring to the one you pointed to. Very useful. Thanks for the link!
An interesting excerpt:
".. so the FAT table is updated 4096 times while writing an 8MB file." (this is with FAT16 and a cluster size of 2KB).
Without wear levelling flash wouldn't be useful at all.


All times are GMT. The time now is 01:18.

vBulletin® Version 3.8.8