maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Using Micro SD Card as Virtual Ram on Nokia N900? (https://talk.maemo.org/showthread.php?t=42357)

mrebanza 2010-01-27 04:22

Using Micro SD Card as Virtual Ram on Nokia N900?
 
On the G1 their is the SuperD Hack that uses some of (or all of) the Video Cards Storage as extra Ram... Is it possible and or has it been done on the N900 and since the biult in 32GB Hard Drive is so big is it possible to use the Micro SD Card as Virtual Ram on Nokia N900? This would make it super fast? :cool:

b666m 2010-01-27 04:35

Re: Using Micro SD Card as Virtual Ram on Nokia N900?
 
mhm?
from nokia's n900 homepage:

Quote:

Total available application memory up to 1 GB (256 MB RAM, 768 MB virtual memory)
it's already using the card as virtual memory (if needed). maybe it's possible to change the value from 768MB to something else.
but i have to say that 1GB ram is far more than most of us will ever use. ^^
(except you want to calculate PI with many decimal places... xD)

mrebanza 2010-01-27 04:54

Re: Using Micro SD Card as Virtual Ram on Nokia N900?
 
Oh so the 1GB virtual total comes standard on the N900?

If so that's GREAT!

rewt 2010-01-27 05:08

Re: Using Micro SD Card as Virtual Ram on Nokia N900?
 
For those who need more VM, and wish to use their entire MicroSD card for this purpose:

(WARNING: This will erase the entire MicroSD card, or worse, some or all of your internal memory if you mistype the device name.. If you plan to proceed, I recommend that you have some idea what you are doing)

In x-term:

Code:

sudo gainroot
mkswap /dev/mmcblk1p1
swapon /dev/mmcblk1p1

The last line will have to be rerun each time your device is rebooted, unless you add an init script to run it.

b666m 2010-01-27 05:09

Re: Using Micro SD Card as Virtual Ram on Nokia N900?
 
Quote:

Originally Posted by mrebanza (Post 496812)
Oh so the 1GB virtual total comes standard on the N900?

If so that's GREAT!

jep.
no need to worry about that you're running out of ram too fast. ;)

mrebanza 2010-01-27 10:26

Re: Using Micro SD Card as Virtual Ram on Nokia N900?
 
@rewt thats freeking great so I can use my 4GB Micro SD as 4GB of RAM!!!!

That is amazing . . . Imagine if I upgraded to 16GB would the system be able to handle all of it?

PS @rewt Thanks for the great info!!!!!!

Rob1n 2010-01-27 10:45

Re: Using Micro SD Card as Virtual Ram on Nokia N900?
 
Quote:

Originally Posted by mrebanza (Post 497125)
@rewt thats freeking great so I can use my 4GB Micro SD as 4GB of RAM!!!!

That is amazing . . . Imagine if I upgraded to 16GB would the system be able to handle all of it?

PS @rewt Thanks for the great info!!!!!!

4G of very slow RAM, yes. And 16GB should be possible as well. I don't see why you'd need it though - I've never come close to using up the 1G that's setup on there at the moment.

And you may also be able to use swap files instead, which saves wasting all the SD card, e.g:
Code:

dd if=/dev/zero of=/media/mmc1/swap1.img bs=1M count=1024
mkswap /media/mmc1/swap1.img
swapon /media/mmc1/swap1.img

This hangs at swapon on my N900 though, so you may need the card formatted as ext3 instead of FAT32.

mrebanza 2010-01-27 10:48

Re: Using Micro SD Card as Virtual Ram on Nokia N900?
 
I thought Micro SD was fast????

jaark 2010-01-27 10:55

Re: Using Micro SD Card as Virtual Ram on Nokia N900?
 
Quote:

Originally Posted by Rob1n (Post 497152)
4G of very slow RAM, yes. And 16GB should be possible as well. I don't see why you'd need it though - I've never come close to using up the 1G that's setup on there at the moment.

Exactly, there is a big difference between real RAM and virtual RAM.

I can't think of many situations where you would be using that much virtual ram and not have significant performance issues due to the system constantly swapping data back and forth (remember 'disk thrashing' on older windows boxes when they started to run out of ram?) Also storage on an SD card will be much, much slower than that on the internal swap area.

Due to the prevalence of native code, here should be less need for virtual ram than on other systems - and application binary and shared libraries etc. are often 'loaded' by mapping them into memory as though they were part of a virtual memory pagefile, under normal circumstances no binary executable code would hit your main virtual memory file.

Rob1n 2010-01-27 11:07

Re: Using Micro SD Card as Virtual Ram on Nokia N900?
 
Quote:

Originally Posted by mrebanza (Post 497157)
I thought Micro SD was fast????

Not really - according to Wikipedia it has a maximum read/write speed of 10MByte/s, whereas a desktop HDD will manage about 70. RAM is somewhere up in the thousands - I don't know off-hand what speed memory is in the N900, but modern desktop RAM is 4-6000.


All times are GMT. The time now is 11:44.

vBulletin® Version 3.8.8