• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Enabling SD swap on Galaxo

sado1

Well-Known Member
How to enable swap on external sdcard? I've got Galaxo rom and 64MB SD card, I want to use entire card for swap partition.
 
There's an option in the custom recovery to create the swap partition. It creates 32mb by default, which should be plenty. If you want to create a bigger one you'll need to use parted. There's guides online somewhere.
 
Yeah, the first thing I tried was that recovery option but it didn't seem to work [I used free to check if swap was enabled]. I've created partition manually in parted and added it to /etc/fstab [/dev/block/mmcblk1p1 none swap sw 0 0; commented /dev/block/mmcblk1 line out] but swap isn't starting automatically.
 
Compcache uses SD swap as backup. That's how its configured as standard. If you want to use sd swap without compcache then you'll need to change the configuration. That doesnt really make that much sense tho. You're better off setting compcache to a small value like 4mb and let that act as a buffer to the sd card swap.
 
Hi, can anyone tell me please:

Is there an easy way in telling if formatting my sd card with swap+FAT32 in the recovery menu has actually worked?

Should I see two partitions on the sd card when using disk management in Xp? Because at the moment I only see one partition.

If someone could enlighten me that would be great.
 
from terminal;
su
parted /dev/block/mmcblk1
help
print


U can create,resize, delete partitions from there.
 
Works a treat thanks. Do you know the commands to resize the partition from terminal? Also how did you get a swap partition to work without compcache? cheers
 
when in parted;
help
print
resize NUMBER START END

When resized,
swapon /dev/block/mmcblk1py, where y is number of the partition.
 
So if I too wanted a partition of 100mb then would the command line look like this:

resize 2 0 100

and then used:

swapon /dev/block/mmcblk1p2

What happens if you also turn on compcache?
 
Ok, thanks. What would happen if compcache was also enabled? Would it still see the new swap partition?

Compcache doesn't help when your phone has at least 100MB of RAM less than needed. So just use

swapon /dev/block/mmcblk1p2
after resizing and tell me what you think. First thing to try is to open more tabs, you can return to them without reloading from the internet.

Important thing is the speed of the sdcard. Make sure it's at least Class4, Class6 is better.

[root@galaxy:/]hdparm -t /dev/block/mmcblk1p2 (external SD - swap partition)

/dev/block/mmcblk1p2:
Timing buffered disk reads: 17 MB in 3.14 seconds = 5530 kB/s

[root@galaxy:/]hdparm -t /dev/block/mmcblk0 (internal SD)

/dev/block/mmcblk0:
Timing buffered disk reads: 21 MB in 3.06 seconds = 7017 kB/s


Try it with yours...
 
Compcache doesn't help when your phone has at least 100MB of RAM less than needed. So just use

swapon /dev/block/mmcblk1p2
after resizing and tell me what you think. First thing to try is to open more tabs, you can return to them without reloading from the internet.

Important thing is the speed of the sdcard. Make sure it's at least Class4, Class6 is better.

[root@galaxy:/]hdparm -t /dev/block/mmcblk1p2 (external SD - swap partition)

/dev/block/mmcblk1p2:
Timing buffered disk reads: 17 MB in 3.14 seconds = 5530 kB/s

[root@galaxy:/]hdparm -t /dev/block/mmcblk0 (internal SD)

/dev/block/mmcblk0:
Timing buffered disk reads: 21 MB in 3.06 seconds = 7017 kB/s


Try it with yours...

I get these results:

/dev/block/mmcblk1p2:
Timing buffered disk reads: 19 MB in 3.14 seconds = 6175 kB/s
hdparm: HDIO_DRIVE_CMD: Inappropiate ioctl for device

/dev/block/mmcblk0:
Timing buffered disk reads: 14 MB in 3.00 seconds = 4765 kB/s
hdparm: HDIO_DRIVE_CMD: Inappropiate ioctl for device

so I can presume from these results that my swap partition is working?

Why do you think my internal SD card is so much slower?
Do you think it could do with reformatting?
 
This is how you check if swap is working.

From the terminal type (btw connectbot is very nice term/ssh):

free

it will return swap size.

try turning swap off and on:
swapoff /dev/block/mmcblk1p2 (wait few moments)
free (check if swap line is 0 now)
swapon /dev/block/mmcblk1p2
free (check if swap is enabled)
 
I have turned the swap on with a 116mb swap partition and found the Galaxy became so laggy after opening a few tabs in the browser. it began to lock up for a minute or two. Is it possible a-swapper is not used in GalaxHero? Reading the blurb about GalaxHero on Hdblog.it, drakaz mentions removing a-swapper in favour of compcache. If this is true how do I put a-swapper back on?
 
I have turned the swap on with a 116mb swap partition and found the Galaxy became so laggy after opening a few tabs in the browser. it began to lock up for a minute or two.

I haven't noticed that lag on my setup. I guess you have compcache turned on. Turn it off and leave just sdcard swap.
 
Back
Top Bottom