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)

geohsia 2010-04-03 20:53

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

Originally Posted by plaban (Post 593553)
Did a test,at first run 30 apps at the same time without sd swap.After that rebooted and created swap in micro sd and run same 3p apps.I noticed that there is a little performance increase.

I wanted to do my own test. My problem is that my apps are extremely resource intensive. I don't need 30 apps I just want 4 to run smoothly.

I created a swapfile but when I went to do swapon it seems like it only works with devices.

If I were to mount the swapfile manually in fstab would it work? I wanted to ask TMO so I didn't brick my system. Thanks.

BTW, what is Busybox?

SAABoy 2010-04-03 21:04

Re: Using Micro SD Card as Virtual Ram on Nokia N900?
 
How about using the built in 32GB as virtual ram, and using the micro SD as whatever?

geohsia 2010-04-03 22:09

Re: Using Micro SD Card as Virtual Ram on Nokia N900?
 
So I figured out how to do the swapfile but when I change fstab it just writes over it when I reboot. Is there another file I can use so that it mounts on startup? I'd like to avoid init scripts if possible. Thanks.

nightfire 2010-04-03 23:14

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

Originally Posted by geohsia (Post 594259)
So I figured out how to do the swapfile but when I change fstab it just writes over it when I reboot. Is there another file I can use so that it mounts on startup? I'd like to avoid init scripts if possible. Thanks.

Yeah, it's annoying. The /etc/fstab gets recreated during bootup; see:

/etc/event.d/rcS-late

On line 15, it calls sfdisk to dump the partition data, and passes it through:

/usr/lib/genfstab.awk

I modified /usr/lib/genfstab.awk to make my changes permanent, but this is an ugly hack.

calltrace 2010-04-12 09:41

Re: Using Micro SD Card as Virtual Ram on Nokia N900?
 
Im afraid of some flash characters - like write/read cycle limit.
Crazy idea - change onboard ram chip to some 512MB ?

tuta 2010-04-12 10:07

Re: Using Micro SD Card as Virtual Ram on Nokia N900?
 
Please guide me how can I change these folder:

space for software installations etc__| /home____________| 2GiB__| Partition of 32GB memory chip
Nokia N900_____________________| /home/user/MyDocs_| 27GiB_| Partition of 32GB memory chip

to microSD card?

rooted 2010-04-15 18:30

Re: Using Micro SD Card as Virtual Ram on Nokia N900?
 
http://wiki.maemo.org/Swap_on_microSD

little_beat 2010-05-05 22:53

Re: Using Micro SD Card as Virtual Ram on Nokia N900?
 
Okay I seem to have managed to format SD from n900's terminal using bundled sfdisk. Here's a step-by-step instruction that's actually not as easy as I wanted it to be:
1) Backup all valuable data from your SD
2) sfdisk /dev/mmcblk1
3) Calculate sizes of partitions you want to create using info on cylinder size. Assume you want fat partition to be X cylinders long.
The program asks for parameters describing partitions you want to create (4 of them)
4) ,X(number you calculated),0b
First parameter is omitted, then sfdisk will start with first available block, Second parameter is actual number you got when calculating 1st partition size. 3rd parameter is Fat32-noLBA partition table ID.
Then input parameters for the second partition parameters
5) ,,S
First and second parameters are omitted - all available space will be used. Partition ID "S" = linux SWAP.
6) Press enter twice (2 dummy partitions are created)
7) If you've read confirmation output for all the partitions to be created and think it's correct then go ahead and type "y" to apply the changes. If not - use "n" to repeat parameter input or "q" to quit sfdisk without making any changes.

Actual commands I used for my 8gig microSD:
sfdisk /dev/mmcblk1
,232000,0b
,,S

This resulted in my card having 350 megs swap partition in addition to a fat32 partition.
I then formatted fat partition from my W7 desktop, and used mkswap & swapon to leverage swap partition.

Sorry for ESL and I'm underslept today to make things even worse. Please note I'm neither maemo, linux, BusyBox or sfdisk expert, so it would be great to recieve some comments on this tutorial from gurus and then publish it to the wiki with appropriate changes.

noipv4 2010-07-02 13:55

Re: Using Micro SD Card as Virtual Ram on Nokia N900?
 
I have tried two class 4 microSDHC cards as second swap devices on N900
a) Polaroid (PNY) 8 GB Class 4
b) Kingston 4 GB Class4

The Kingston one provided much better performance with a 768MB partition on it as a swap device.

I am now planning to get a Transcend Class 6 microSHDC card (this card has rave reviews about it's high write throughput) and use it as additional swap space.

IMHO 256MB RAM just doesn't cut it for the N900 loaded with applications many of which run in the background.

godofwar424 2010-07-02 17:49

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

Originally Posted by nightfire (Post 576643)
This should be an option out-of-the-box (assuming the user is fairly warned about being unable to eject the microsdhc card while running).


Errm?? Do you not realise that if you remove the backcover, the memory card is ejected?

Once that little magnet on the backcover isnt closing the switch then the memorycard is dismounted and unable to be accessed by the device.


All times are GMT. The time now is 12:06.

vBulletin® Version 3.8.8