Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,772,276 Members 44,631 Now Online
XDA Developers Android and Mobile Development Forum

Swapper [Root Users] Reduce Lag and Save Ram

Tip us?
 
Patambiz
Old
(Last edited by Patambiz; 25th October 2012 at 09:51 PM.)
#1  
Patambiz's Avatar
Senior Member - OP
Thanks Meter 297
Posts: 389
Join Date: Jul 2012
Location: Legazpi

 
DONATE TO ME
Default Swapper [Root Users] Reduce Lag and Save Ram

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, 20738 views)
File Type: apk terminal emulator.apk - [Click for QR Code] (24.8 KB, 9109 views)
The Following 63 Users Say Thank You to Patambiz For This Useful Post: [ Click to Expand ]
 
Patambiz
Old
(Last edited by Patambiz; 17th August 2012 at 08:53 PM.)
#2  
Patambiz's Avatar
Senior Member - OP
Thanks Meter 297
Posts: 389
Join Date: Jul 2012
Location: Legazpi

 
DONATE TO ME
Default 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

<-- Just Hit the Thanks Button ♦♦♦ Awesome Swap to Free RAM || Xperia (Arc S) Arctic Rom By ^Me^-->


The Following 16 Users Say Thank You to Patambiz For This Useful Post: [ Click to Expand ]
 
danisariandi
Old
#3  
Account currently disabled
Thanks Meter 2273
Posts: 3,097
Join Date: Apr 2012
Location: Tangerang
Does it risk ?
 
Patambiz
Old
#4  
Patambiz's Avatar
Senior Member - OP
Thanks Meter 297
Posts: 389
Join Date: Jul 2012
Location: Legazpi

 
DONATE TO ME
Quote:
Originally Posted by danisariandi View Post
Does it risk ?
Nope, I didn't wipe any data..
You can Enable and Disable Swap anytime

<-- Just Hit the Thanks Button ♦♦♦ Awesome Swap to Free RAM || Xperia (Arc S) Arctic Rom By ^Me^-->


The Following 2 Users Say Thank You to Patambiz For This Useful Post: [ Click to Expand ]
 
XTCrefugee
Old
#5  
Senior Member
Thanks Meter 28
Posts: 232
Join Date: Jun 2006
Location: Bristol
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?

I9505XXUFNC5 (4.4.2) | stock w/ mods | rooted
The Following User Says Thank You to XTCrefugee For This Useful Post: [ Click to Expand ]
 
danisariandi
Old
#6  
Account currently disabled
Thanks Meter 2273
Posts: 3,097
Join Date: Apr 2012
Location: Tangerang
How to disable it ?

Sent from my LT15i using xda premium
 
Patambiz
Old
#7  
Patambiz's Avatar
Senior Member - OP
Thanks Meter 297
Posts: 389
Join Date: Jul 2012
Location: Legazpi

 
DONATE TO ME
Quote:
Originally Posted by danisariandi View Post
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.

<-- Just Hit the Thanks Button ♦♦♦ Awesome Swap to Free RAM || Xperia (Arc S) Arctic Rom By ^Me^-->


 
Patambiz
Old
#8  
Patambiz's Avatar
Senior Member - OP
Thanks Meter 297
Posts: 389
Join Date: Jul 2012
Location: Legazpi

 
DONATE TO ME
Quote:
Originally Posted by XTCrefugee View Post
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.

<-- Just Hit the Thanks Button ♦♦♦ Awesome Swap to Free RAM || Xperia (Arc S) Arctic Rom By ^Me^-->


 
n3n00
Old
(Last edited by n3n00; 8th August 2012 at 07:56 AM.)
#9  
n3n00's Avatar
Senior Member
Thanks Meter 249
Posts: 1,524
Join Date: Dec 2010
Location: Split
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)
 
wth_is_life
Old
(Last edited by wth_is_life; 8th August 2012 at 11:22 AM.)
#10  
wth_is_life's Avatar
Senior Member
Thanks Meter 75
Posts: 647
Join Date: 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 ?
LT18i

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

Advanced Search
Display Modes