maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia 770 (https://talk.maemo.org/forumdisplay.php?f=24)
-   -   Trying to understand Memory (https://talk.maemo.org/showthread.php?t=12689)

whayong 2007-12-03 23:15

Trying to understand Memory
 
Hey guys. I'm struggling with understanding how the memory works in the 770. I'm having issues with apps freezing and eventually the whole thing ends up restarting. I noticed that enabling the virtual memory via control panel helps. My one issue with this is when connecting the USB to the computer to copy files and virtual memory enabled, the 770 prompts me to turn off virtual memory before letting me transfer files. Is this normal? Is there anyway around this? Another question is will enabling virtual memory decrease my RS-MMC cards life?

TA-t3 2007-12-04 12:11

Re: Trying to understand Memory
 
The reason it prompts you top turn off virtual memory at that point is because the 770 can't keep the card mounted (=visible to the 770) at the same time as it works as a USB card reader. And it can't unmount the card as long as a file is open, or the virtual memory is in use. So yes, this is normal.

As for decreasing the lifetime of the card, it's been claimed several times on this forum that using the card for virtual memory (or rather, swap space, which is more accurate - it _increases_ VM, it doesn't create VM) would be particularly bad for the lifetime of the card. However, I don't buy this. Using the card for swap space will engage the wear-leveling mechanism of the card just as any other writing will, so it's no different from just writing to a file on the card now and then. What I mean is that VM isn't anything special in this respect. It also follows that the larger the card is, the longer it will last, because the wear leveling will have more area available for to, er, level over.

fanoush 2007-12-04 12:50

Re: Trying to understand Memory
 
Quote:

Originally Posted by TA-t3 (Post 104198)
Using the card for swap space will engage the wear-leveling mechanism of the card just as any other writing will, so it's no different from just writing to a file on the card now and then. What I mean is that VM isn't anything special in this respect. It also follows that the larger the card is, the longer it will last, because the wear leveling will have more area available for to, er, level over.

Well there is one difference which may or may not matter. Most other writes are scattered to different logical blocks. With swap the writing is more or less to the same place (logical blocks) over and over.

Still this should be handled by wear leveling too but you can only be 100% sure if you work for company manufacturing SD card controllers. I can imagine implementation where card is divided to zones and (for simplicity) only logical blocks in same zone are recycled/rotated in wear leveling algorithm. This would mean writing same blocks could stress some part of the card more.

Anyway, I too think using swap is 'safe' and people should not bother much about theoretical limits. Cards are cheap. They mostly also have lifetime warranty which also suggests something about wear leveling efficiency and chances that card gets destroyed by too much writes.

Also in typical situation swapping does not write to the card so much.

whayong 2007-12-04 21:20

Re: Trying to understand Memory
 
Sweet! Thanks for the tips guys. I really appreciate it.


All times are GMT. The time now is 13:05.

vBulletin® Version 3.8.8