I have created a 1 GB a2sd partition in CWM, works perfect! Every app is on sd-card. In the same menu in CWM there was an option to create a swap partition, so I created a 256 MB partition. After reboot I checked in terminal if swap worked. Typed "su" followed by "free", swap showed 0 0 0... But then I found an app in Google Play named "ResetSwap" where I can turn swap partition on/off. When I check in terminal it works great! The "problem" is that every time I reboot I have to manually turn swap on in ResetSwap. Is there a way to make the swap partition autostart after boot??
Thanks in advance!
Sent from my ST18i using xda premium
U need another kernel rather than the official one
Hi there
what u need is to flash a kernel support swap function which the official doesn' t.
swap needs kernel support to work.
AND flash unofficial kernel means U need get ur bootloader unlocked.
If that's what u don't want , then give up.
if not there are instructions on this forum, just follow it.
In my opinion, if u don't play huge game ,ray's 512 ram is just enough for daily surf and simply work.
Hi!
Thank you for answering. My bootloader is unlocked, I'm running Sirkay v.6 @ 1,6 Ghz. Rooted + supercharged. The stock Xperia Home is freezed in Titanium Backup, I only use Launcher Pro. I have got the swap partition to work, only it doesn't start automatically when boot. It has to be done manually. I want it to start automatically. But I have found that there's use for the swap. I have lots of apps that together eats a lot of ram. Generally I have about 50-60 MB of free ram and the system also uses about 120-150 MB of the swap partition! I know the SD-card isn't as fast as the ram, but I don't see any difference when using it. Its an Samsung 32 GB class 10. Before I created the swap partition I got lot of crashes from several apps, I guess it ran out of ram. Maybe some say its not because of low ram that makes them crash, its because Launcher Pro isn't built for ICS. But I'm using the phone all the time, lots of multitasking. Have to charge the battery at least 2 times every day. So I'm pretty sure the swap file is working great, I get no crashes with the swap enabled. But I do get them without, several times every day. But basically, I just wanted to know if its possible to autostart the swap-file.
Best regards!
Sent from my ST18i using xda premium
open notepad or creat newfile with xplorer, name it swapper or what you like. type this command
#/system/bin/sh
swapon /dev/block/mmcblock0p3
save it and put it to /etc/init.d chmod it 777
hope it work for u
It's actually swapon /dev/block/mmcblk0p3 not mmcblock0p3.
HI,
It's my first post here and I'm glad to be a member on this fantastic website.
I have a problem with the swap partition on my device, Xperia arc.
I flashed my device to "LT15i 4.1.B.0.431 Generic Global World" follow by this post.
I found that lacking in memory so I tried to use swap partition and created 256 Linux swap partition on my SD card. But "free" commend still shows swap=0
However, I decided to use swapper 2. Still no effect and I couldn't get swap although swapper did its job without fail!
After few days search I found that the kernel doesn't support the swap, So, I tried to use "Kernel.sin unpacked and added CWM options" form here. It also didn't work, neither "init.d zram scripts from wedgess" from the same page.
However, I'm looking for help to use swap on my device or any suggestion that can help me to improve memory in my device.
P.s. I'm a newbie in Android and still don't understand it very well specially those names like rom and etc, but I have been using Linux (Fedora) for 6 years.
edanny101 said:
HI,
It's my first post here and I'm glad to be a member on this fantastic website.
I have a problem with the swap partition on my device, Xperia arc.
I flashed my device to "LT15i 4.1.B.0.431 Generic Global World" follow by this post.
I found that lacking in memory so I tried to use swap partition and created 256 Linux swap partition on my SD card. But "free" commend still shows swap=0
However, I decided to use swapper 2. Still no effect and I couldn't get swap although swapper did its job without fail!
After few days search I found that the kernel doesn't support the swap, So, I tried to use "Kernel.sin unpacked and added CWM options" form here. It also didn't work, neither "init.d zram scripts from wedgess" from the same page.
However, I'm looking for help to use swap on my device or any suggestion that can help me to improve memory in my device.
P.s. I'm a newbie in Android and still don't understand it very well specially those names like rom and etc, but I have been using Linux (Fedora) for 6 years.
Click to expand...
Click to collapse
Did you try manually turn on swap with "swapon"?
Also you can create swap in file.
Code:
cd <to your SD card>
dd if=/dev/zero of=swapfile bs=1024 count=65536
mkswap swapfile
swapon swapfile
Thanks a lot for your kind reply.
I flashed my device to cm10 and it works much better.
I tried to remove this post but I could not.
Thanks anyway for your time to read my post and reply.
Cheers.
Hi there, i already searched and i know what swap and zram are aswell their differences and all that... but what i want to know and i was unable to find is can i use both of them? I mean can i use hardswap with a partition of lets say 512 on a class 10 card and use zram at the same time? Will i have anymore benefits using both of them if i can or it will just slow down the device/doesnt bring any benefits at all using both?
I am asking because i am running omega 53v and yank55 kernel and in the kernel there both option, i am just wondering if it is worth enabling swap and zram or i have to choose 1 of them.
Hello all, as some of you know that there is a way that lets you increase your device's ram capacity, and that is by swap, well am here to give you simple and easy steps to enable swap on your device.I only tested this on few devices so don't complain if it didn't work.
I'am not responsible for any damage could happen, you are doing it at your own risk.
Prerequisites
1-An android phone (duhh )
2-Must be rooted.
3-Busybox xbin. (Read below)
4-Kernel Must Support Swap
Tested devices
-Galaxy Ace S5830
-Galaxy Ace S5830i
-Galaxy Ace 2
-Galaxy S4 (don't ask why!)
-Galaxy S4 mini
-Galaxy Ace Plus
-Sony Xperia Sola
Tested android versions
-2.3.x
-4.0.x
-4.1.x
-4.2.2
-4.3.0
-4.4.2 (got some problems)
-4.4.4 (got some problems)
kitkat users may find a problem that swap has a limit of 50 MB or 150 MB ( Caused by the new 4.4.x kernel Just Try It)
Installing busybox xbin
{If you are not sure what is this then just go to how to swap
And if swap didn't work the come back here and apply the steps}
1-Download busybox from playstore or buy the pro version
2-Run busybox
3-Wait for the loading
4-Then normal install or smart install in case you are in pro.
5-When done installing restart your phone
How to swap
1-Install simple root swap
2-Run it and give it root permission
3-Specify the size of swap file (how much MB you want to add as virtual ram) (big size needs more time)
4-Create swap file
5-Check enable at boot
6-Click on
7-Check if the swap worked
8-Enjoy...
reserved
I did every thing and nothing happened ?
I have xperia u with Experimental v12...
Sent from my Xperia U using XDA Premium 4 mobile app
Heads up! using swap on SD card may decrease your SD card's lifetime.
Can we damage our systems any how?Can I try this on a auto navi system with Android 4.0.3?
Thx
Sent from my iPhone using Tapatalk
Csi02 said:
Can we damage our systems any how?Can I try this on a auto navi system with Android 4.0.3?
Thx
Sent from my iPhone using Tapatalk
Click to expand...
Click to collapse
Since the swap file in made on the SD Card, No, it will not damage your system but there is a high chance it can affect the SD Card. If you have an SD Card, then yes you can try this on Auto Navi System with Android 4.0.3. Make sure to have a class 8 or greater SD Card to get maximum speed. Hope I Helped
Thx for your answer! I will try it after I buy another SD class! I hope that will make my unit a little smoother!
Sent from my iPhone using Tapatalk
It does NOT work on Galaxy Ace S5830i with this ROM and this kernel...
MorgenTee said:
It does NOT work on Galaxy Ace S5830i with this ROM and this kernel...
Click to expand...
Click to collapse
Can you find the swap file on your SD Card? If not then can you tell us exactly what happens when you choose to create swap?
mahithm said:
Can you find the swap file on your SD Card? If not then can you tell us exactly what happens when you choose to create swap?
Click to expand...
Click to collapse
The file is there, it has the size that I choose in "Simple Root Swap". I tried 200 MB and 100 MB.
The "Info" tab of "Simple Root Swap" tells me however:
Status Swap:
Total Swap: 0MB
Used Swap: 0MB
Free Swap: 0MB
When I open a terminal emulator "free" tells me 0 swap, "swapon -a" tells me that /etc/fstab does not exist...
MorgenTee said:
The file is there, it has the size that I choose in "Simple Root Swap". I tried 200 MB and 100 MB.
The "Info" tab of "Simple Root Swap" tells me however:
Status Swap:
Total Swap: 0MB
Used Swap: 0MB
Free Swap: 0MB
When I open a terminal emulator "free" tells me 0 swap, "swapon -a" tells me that /etc/fstab does not exist...
Click to expand...
Click to collapse
Did you press the On button below Auto Start? Once you create the Swap file using the Re/ Create button, tick the Auto Start box and press the On button below that. That should activate swap on SD Card. Now check Info to see your swap details or use "free" on Terminal. Do post the result. Hope I Helped
mahithm said:
Did you press the On button below Auto Start? Once you create the Swap file using the Re/ Create button, tick the Auto Start box and press the On button below that. That should activate swap on SD Card. Now check Info to see your swap details or use "free" on Terminal. Do post the result. Hope I Helped
Click to expand...
Click to collapse
I have done that already. After the creation of the swap file, I checked "Auto Start" and clicked "on". I also tried restarting the phone, but it didn't change anything.
MorgenTee said:
I have done that already. After the creation of the swap file, I checked "Auto Start" and clicked "on". I also tried restarting the phone, but it didn't change anything.
Click to expand...
Click to collapse
Did you install BusyBox? Creating and running swap requires certain binaries which may not be present in the rom by default. Do post the result.
mahithm said:
Did you install BusyBox? Creating and running swap requires certain binaries which may not be present in the rom by default. Do post the result.
Click to expand...
Click to collapse
Yes, I followed the instructions (see below) in the first post exactly.
Installing busybox xbin
{If you are not sure what is this then just go to how to swap
And if swap didnt work the come back here and apply the steps}
1-downlpad busybox from play store or buy th pro version
2-run busybox
3-wait for the loading
4-then normal install or smart install incase you are in pro.
5-when done installing restart your phone
How to swap
1-install simple root swap
2-run it and give it root permission
3-specify the size of swap file (how much mb you want to add as virtual ram) (big size needs more time)
4-create swap file
5-check enable at boot
6-click on
7-check if the swap worked
8-enjoy...
Click to expand...
Click to collapse
Is it possible that the kernel I am using is lacking swap capabilities and therefore, the app cannot make swap work?
MorgenTee said:
Yes, I followed the instructions (see below) in the first post exactly.
Is it possible that the kernel I am using is lacking swap capabilities and therefore, the app cannot make swap work?
Click to expand...
Click to collapse
Since you have followed all the instructions perfectly, it must be the kernel. Rafael's kernel does have swap support though.
mahithm said:
Since you have followed all the instructions perfectly, it must be the kernel. Rafael's kernel does have swap support though.
Click to expand...
Click to collapse
Thanks! Too bad that it won't work for my setup. I will consider trying the other kernel once I do have some more time on my hands.
This worked very well for me. Thanks OP! :good:
MorgenTee said:
The file is there, it has the size that I choose in "Simple Root Swap". I tried 200 MB and 100 MB.
The "Info" tab of "Simple Root Swap" tells me however:
Status Swap:
Total Swap: 0MB
Used Swap: 0MB
Free Swap: 0MB
When I open a terminal emulator "free" tells me 0 swap, "swapon -a" tells me that /etc/fstab does not exist...
Click to expand...
Click to collapse
Your kernel might not support swap...
M2M_RockS said:
I did every thing and nothing happened ?
I have xperia u with Experimental v12...
Sent from my Xperia U using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Check your kernel swap support...
Sorry for flooding... I hv a que. Can I use swap in rom TWRD 1.0
Sent from my GT-S5830i using xda app-developers app
Hi everyone.
Using Ozcan ROM 6.3 on my Galaxy S4, I'm observing kswapd0 process making CPU laggy. The same thing happened on another TW KK ROM - Omega. After researching on it for weeks, I realized that it's the process that does the SWAP job - transferring RAM contents to storage when memory is low.
Presently, I don't want to use SWAP, so the following are the workarounds that I tried to disable SWAP:
Tried Apps like Swapper2, Reset Swap to delete swapfile. The process vanishes for few seconds but it looks like the swapfile again gets created (checked by using command, free).
Used the command swapoff -a (to Stop swapping on all swap devices) but it gives me an error - swapoff: /etc/fstab: No such file or directory
And, my Queries are as follows:
Why and how does SWAP gets enabled automatically? Is the kernel or ROM responsible for it?
When actually could the SWAP partition be created when I didn't do it manually? On flashing the ROM?
What I'm doing wrong in the swapoff comand? After reading about the same error, I think it's related to the location of the swapfile. So, how can I know the location of the swapfile?
Any suggestions on disabling the SWAP permanently or making kswapd0 use less CPU if the lag is not directly related to SWAP?
Thanks for reading. Hoping a good response.
Any kind of suggestion or discussion would be greatly appreciated.
Thanks again and a Happy New Year.