Cure for Everything…

Menu

Increase Available RAM in Android Using Swap

One of the worst things on certain budget-friendly smartphones is not having quite enough RAM. This normally isn’t a big deal for many users who use their phone for the practical purposes of calling people, sending texts, and checking email. However for people who do a lot more with their devices such as gaming and heavy app usage, the shortage of RAM may be a bit more limiting. Running out of RAM can cause a lot of problems such as app crashes and large-scale lag. While you would have a hard time physically soldering on more RAM, users of the Samsung Galaxy Y , Y duos , or lower end devices can enable a swap file and partition thanks to a method written up by XDA Senior Member CarlDeanCatabay. This is similar to the pagefile used in windows, and while it isn’t nearly as fast as RAM, it may help certain apps that require a bit more breathing room . The method is a little complicated, and requires you to repartition your SD Card. This method will also potentially lower the lifespan of your SD Card due to the higher number of write cycles. What is SWAP : Swap is, in short, virtual RAM. With swap, a small portion of the hard drive is set aside and used like RAM. The computer will attempt to keep as much information as possible in RAM until the RAM is full. At that point, the computer will begin moving inactive blocks of memory (called pages) to the hard disk, freeing up RAM for active processes. If one of the pages on the hard disk needs to be accessed again, it will be moved back into RAM, and a different inactive page in RAM will be moved onto the hard disk (‘swapped’). The trade off is disks and SD cards are considerably slower than physical RAM, so when something needs to be swapped, there is a noticeable performance hit. Unlike traditional swap, Android’s Memory Manager kills inactive processes to free up memory. Android signals to the process, then the process will usually write out a small bit of specific information about its state (for example, Google Maps may write out the map view coordinates; Browser might write the URL of the page being viewed) and then the process exits. When you next access that application, it is restarted: the application is loaded from storage, and retrieves the state information that it saved when it last closed. In some applications, this makes it seem as if the application never closed at all. This is not much different from traditional swap, except that Android apps are specially programed to write out very specific information, making Android’s Memory Manager more efficient that swap.

What you need:

MiniTool Partition Wizard for SD Card Partitioning

A MicroSD HC 4GB or higher class 6 or class 10

MicroSD HC Card Adapter

A card reader (if your pc doesn’t have card reader built in | USB Mount is not adviseable)

Select partition SD card and select the partition size that delights you

How to use Swap

For ROM Supporting SWAP scripts like CyanogenMod ROMs and AOKP ROMs , no need for swapper application , just make partitions as mentioned above and swap script will do the rest work, just try to see if it is working ,if not then follow this.

For Costom ROMs and AOSP ROMs For us to be able to use swap file or swap partition, we need to use Swapper2 which you can get from Google Play.

After setting preferences, press back and tap on “ON” to turn on swap. Reboot afterwards

UPDATE : AN IMPORTANT HINT:

Thanks to mr.bitman for drawing attention to this part: For users with swap enabled kernel. When i tried swapper2 with three partitions (fat32/ext3/swap) and used your mountpoint (Swap partition: /dev/block/mmcblk1p2) swapper formatted on startup the ext3-partition (used by Link2SD or others) and I ended up with 2(!) swap-partitions and a crippeld system. Then i changed the mountpoint to: “/dev/block/mmcblk1p3″ (because it’s the third partition on the sd).. How can I tell if swap is running? Go to the terminal emulator – or open adb shell – and run ‘free’. It looks like this (with anything other than zeros in the swap line), you do have swap: in treminal emultor: in adb shell :

“free” command will show you the available free RAM on device, if its showing swap 0 , then swap is not activated , if swap is activated you can see free and used swap memory, like in screenshot . Which device you are using ? is it rooted ? [ Root is required + Busy box installed]

Thanks for the tutorial! But does not work for the latest version of Gingerbread, the 2.3.6. I’m using Galaxy W with the sd card and the internal memory and the external memory such as USB. By using the application, it gives error for execution because he can not create the swap file. Any suggestions?

bro i have done all the settings correctly n tried n retried several times but i m getting error like >setting swappiness ok>turning swap off(file) FAIL>swapoff:cant stat ‘/sdcard/swapflie.swp’:No such file or directory.but bro i do have swap file in sd card and also put in different folder also to check but i thinks its kernel problem or is enable to on swap file do something.i m using micromax a50 (rooted) checked on both stock rom and jetmod 3.0 rom.help bro i have only 70mb ram for moderate usage.thanks

i have done all the things you told about, busy box installed, swapper 2 installed, miniwizard etc etc..
but i configured the swapper as instructed …and when i switch it on ..in the low display its says FAIL…blah blah,,,
and then i used terminal emulator to see that swap status….it has all 0s in the swap line…please help
thanks

i have 8 gb memory card if i use link to sd and increase internal memory and also increase ram would there will be a chances of burning of sd card i have increased internal memory 1 gb and ram 200 mb plzzz reply fast im waiting

You should add a hint for users with swap enabled kernel. When I tried swapper2 with three partitions (fat32/ext3/swap) and used your mountpoint (Swap partition: /dev/block/mmcblk1p2) swapper formatted on startup the ext3-partition (used by Link2SD or others) and I ended up with 2(!) swap-partitions and a crippeld system. Then i changed the mountpoint to: “/dev/block/mmcblk1p3” (because it’s the third partition on the sd) and everything works fine. Nice tutorial, thnx

Good Day!
My phone is sony xperia neo L is it possible to use swapper2?
and i have clockworkmod recovery is it required to install cyanogen mod?..
and lastly my sd card has a capacity of 16 GB can you give me a recommended size of partitioning?
Thank you! and hopefully you can help me…
God bless!

Rooting a particular device sometimes need device specific method ,so its not possible to make guide to root all device , then also you can tell your device or request for guide , i’ll try to provide it

Can I use Rescue Root for rooting my Xolo A500. It looks to be satisfactory, but it is still in beta version with no support for Android 4.0.4 yet, but it has been promised that 4.0.4 will be supported very soon. So can I go forward and use it? What is your opinion?

HI I am using micromax a87 but when i have finished doing the partitions no changes i have seen in it and when i open my link2sd it wants partition and when i select one it displays if you have root acess so click on grant or acess and i was also unable to root my phone and i also did not get clockworkmod so please help me.

For partitioning the SD card can we use the recovery mode method and for increasing RAM can we do the following.
◦For increasing your device RAM you have to firstly download “Swapper for Root” from Google Play Store.
◦Open the app that you have downloaded now for RAM and select the amount of RAM you want to increase.
◦Let the application to create the .swp file and you have increased the ram you wanted.

I like the helpful info you provide for your articles.
I’ll bookmark your weblog and take a look at again right here regularly.
I’m fairly certain I will be told many new stuff
right here! Good luck for the following!

Wonderful goos from you, man. I have bear in mind your stuff prdvious to and you’re just extremely magnificent.
I really like what you’ve obtained here, really like wha you’re stating and the way
in which in which you saay it. You make it enjoyable and you
still csre for to keep it smart. I can not wait to learn far more from you.
This is really a terrific web site.