Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Swapper [Root Users] Reduce Lag and Save Ram

OP Patambiz

8th August 2012, 04:07 AM   |  #1  
Patambiz's Avatar
OP Senior Member
Flag Legazpi
Thanks Meter: 300
 
389 posts
Join Date:Joined: Jul 2012
Donate to Me
More
So what is Swap?

A swap file allows an operating system to use hard disk space to simulate extra memory. When the system runs low on memory, it swaps a section of RAM that an idle program is using onto the hard disk to free up memory for other programs. Then when you go back to the swapped out program, it changes places with another program in RAM. This causes a large amount of hard disk reading and writing that slows down your computer considerably.

I can say Swap file is like Virtual Memory on your PC.

New Info:
For those who struggle with the Free on terminal Emulator, the swapper will still work. Here is the simple Instruction. Just make as 100-128mb Swap then put it to 50 swappines, reboot and done.

The Swapper can Work on Many Devices. I tested it on Neo V, Arc S and Samsung Galaxy SII
Just to make sure it supports this kind of Feature. Free to try it, its harmless.
Requirements:
-Any Rom- (Tested on Acronium 4 and I-Scream)
-Custom Kernel- (Tested on KGT and Xarc Kernel)
-300+ sdcard space-
-Terminal Emulator-
Source: Google Play
or Attached File

Start:
Download the Swapper2 and install.

Click Here

2. Go to terminal emulator type "Free" without the Quotation.
Make sure you see "0" on the Swap



3. open swapper2 go to Setting, Swap size=32 MB, Swappiness=60. (You can Play on the numbers you want I just displayed a Default Swap Settings.)
Go Advanced preferences check "Recreate swap file" and "Reformat swap" then exit...



4. Open Swapper2 click ON it will show some Fail.
Just wait for few secs or mins and it will continue. If not, Click the ON again.



5. Go to terminal emulator type free and you will see that the "0" has been replaced.





Hit thanks if you think I helped.

Note:
This just give Everyone Idea that Swapfile is working without Partitioning your SD cards.
Attached Files
File Type: apk Swapper 2.apk - [Click for QR Code] (82.4 KB, 25005 views)
File Type: apk terminal emulator.apk - [Click for QR Code] (24.8 KB, 10651 views)
Last edited by Patambiz; 25th October 2012 at 10:51 PM.
The Following 63 Users Say Thank You to Patambiz For This Useful Post: [ View ]
8th August 2012, 04:12 AM   |  #2  
Patambiz's Avatar
OP Senior Member
Flag Legazpi
Thanks Meter: 300
 
389 posts
Join Date:Joined: Jul 2012
Donate to Me
More
Reserved
Notes:
Risk Free..
Enable/Disable Swap
Safe SD Card
Free to experiment what Numbers is suitable on your Settings.
The swap file Works well when your system Ram went low that can help Handling Running Process and Multitasking.

---
Update.. 0.1
---
For those who cannot do the do the Swap due to Kernel Issue
Here is a new way without using the Swapper 2

SOLUTION: How to make simple ZRAM init.d script



1. Using Root Explorer, got to /sytem/etc/init.d/
2. press Menu then create new file
3. paste these in it
Code:

Quote:

#!/system/bin/sh
sysctl -w vm.swappiness=60
echo '1' > /sys/block/zram0/reset
echo $((60*1024*1024)) > /sys/block/zram0/disksize
mkswap /dev/block/zram0
swapon /dev/block/zram0

4. close and save it as 99zram
5. set permission to 777 or "rwxrwxrwx" (tick all)
6. take note: 60*1024*1024 = 60MB zram disksize. if you want to set 30MB, change 60 to 30.

Thanks.

I will be Unavailable for a Moment. Im creating my own Custom Kernel
Last edited by Patambiz; 17th August 2012 at 09:53 PM.
The Following 16 Users Say Thank You to Patambiz For This Useful Post: [ View ]
8th August 2012, 04:35 AM   |  #3  
Account currently disabled
Flag Tangerang
Thanks Meter: 2,275
 
3,097 posts
Join Date:Joined: Apr 2012
More
Does it risk ?
8th August 2012, 04:39 AM   |  #4  
Patambiz's Avatar
OP Senior Member
Flag Legazpi
Thanks Meter: 300
 
389 posts
Join Date:Joined: Jul 2012
Donate to Me
More
Quote:
Originally Posted by danisariandi

Does it risk ?

Nope, I didn't wipe any data..
You can Enable and Disable Swap anytime
The Following 2 Users Say Thank You to Patambiz For This Useful Post: [ View ]
8th August 2012, 06:14 AM   |  #5  
Senior Member
Flag Bristol
Thanks Meter: 28
 
233 posts
Join Date:Joined: Jun 2006
More
Unfortunately, this doesn't work on the stock kernel as we don't have the ramzswap module. But as I mentioned here it looks like it could be compiled as a loadable module if someone was willing to do it. Any takers?
The Following User Says Thank You to XTCrefugee For This Useful Post: [ View ]
8th August 2012, 06:14 AM   |  #6  
Account currently disabled
Flag Tangerang
Thanks Meter: 2,275
 
3,097 posts
Join Date:Joined: Apr 2012
More
How to disable it ?

Sent from my LT15i using xda premium
8th August 2012, 06:37 AM   |  #7  
Patambiz's Avatar
OP Senior Member
Flag Legazpi
Thanks Meter: 300
 
389 posts
Join Date:Joined: Jul 2012
Donate to Me
More
Quote:
Originally Posted by danisariandi

How to disable it ?

Sent from my LT15i using xda premium

There is an option Run Startup. when checked/uncheked.

Or just uninstall the app. its disabled.
8th August 2012, 06:39 AM   |  #8  
Patambiz's Avatar
OP Senior Member
Flag Legazpi
Thanks Meter: 300
 
389 posts
Join Date:Joined: Jul 2012
Donate to Me
More
Quote:
Originally Posted by XTCrefugee

Unfortunately, this doesn't work on the stock kernel as we don't have the ramzswap module. But as I mentioned here it looks like it could be compiled as a loadable module if someone was willing to do it. Any takers?

Yes, I used Xarc kernel. Somehow It doesn't work with other kernel. They can use the zram instead.
8th August 2012, 07:19 AM   |  #9  
n3n00's Avatar
Senior Member
Flag Split
Thanks Meter: 250
 
1,530 posts
Join Date:Joined: Dec 2010
More
I would love this but I'm on stock kernel. Can I use module from other thread or is anyone able to make loadable module?

How does your "Running services" look after swap? (edit: oh I can see in your signature... nice I want this on stock kernellll :S)
Last edited by n3n00; 8th August 2012 at 08:56 AM.
8th August 2012, 12:14 PM   |  #10  
wth_is_life's Avatar
Senior Member
Thanks Meter: 75
 
647 posts
Join Date:Joined: Mar 2012
Will it work on ArcKnight ?

Quote:

This causes a large amount of hard disk reading and writing that slows down your computer considerably.

Umm can you explain it more, since if it slows down... ?

I've learned that this may harm SD card, is it true ?
Last edited by wth_is_life; 8th August 2012 at 12:22 PM.

Post Reply Subscribe to Thread

Tags
ram, speed, swap, swapper
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes