Adding Swap Space Ram to G1

Today i got a little bored and decided to try to set up some swap space on my sdcard for my g1 to see if i can get a little better running!
I started with formatting some of my card to linux-swap but then i kept running into problems with "invalid argument" commands in the terminal!

So how i actually set it up was i mounted my sdcard as read/write with droidsans and went into my terminal and typed:

dd if=/dev/zero of=/sdcard/swapfile bs=1024 count=(however many mb of swap you want multiplied by 1024 *example* if i want 200mb of swap i would times that by 1024 and then i would type that value right after the count)

it will hang for like 45 seconds and then it will work so be patient then type

mkswap /sdcard/swapfile
then type:
swapon /sdcard/swapfile
then check to see if it worked by typing:
free

*this has sped up my application opening time and when i delete alot of messages it no longer freezes

*use at least double the ram that the phone has for your swap but no more than 2gb

*i have edited my /etc/fstab to try to get it to boot the swap at startup but it doesnt work if any of you want to work with me on that email me at [email protected]

*if you want to know how to change fonts on the g1 go to my blog at: http://jerrysfreakinblog.blogspot.com/
 
FYI - there's an application on the market that does the exact same thing but it's always nice to know how to do it manually. I've been doing it for a while now
http://www.cyrket.com/package/lv.n3o.swapper
 
yeah i know of that app but when i used that it was trying to copy caches to my sd and it caused some of my apps to not work the way i say is just a basic swapfile that doesnt copy any certain files it just extends it.....for some reason whenever i copy apps and cache to my sdcard my superuser access goes all crazy and it wont let me log in as root on my terminal
 
No the only thing you whill have to type in is
swapon /sdcard/swapfile

the other code is just setting up the file to be swap and this code turns it on
 
I just got my g1 so excuse the noob question but can non rooted have swap or does your device have to be rooted to achieve swap?
 
Okay, I recently got my g1. I rooted it right away. I'm am certainly a noob at this stuff, but I'm trying to dive in and really learn some stuff. I've always enjoyed doing this kind of crap, and figure the g1 is a good place to start using android/linux in a practical way (for my day to day purposes anyways), and to really take a smart phone to it's true limits. With that said:

1) What exactly is this whole swap thing?

2) It uses memory/space from your sdcard as extra ram for you phone? Is this something I have to set up only once?

3) What is the difference between this method, and using the g1 10mb hack method of swapping memory from the GPU? (It's seems to me that the method being discussed in this thread is better if it's essentially doing the same thing... though I'm not sure how it is the same thing, as I'm of the understanding that the sdcard is very different than the ram on the phone... the stuff being freed up by the 10mb hack).

Okay. I guess that's it for now. Hopefully I didn't make myself look too much like an ass. Thanks in advance for any information/answered/etc.
 
Back
Top