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.
Related
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.
Hello,
How to test internal nonvolatile storage (filesystem space) accessible to running apps for being successfully writable and readable afterwards? And have some numerical results, not having to guess what is going on from behavioural events. I mean some already available app or some console command. I do not mean writing code myself.
This post is related to my other question posted here, but I decided to to separate this one for clarity.
I consider this not trivial (maybe in error) because it appears to me, that Android filesystem must be RAM cached and written back to NVram only when needed (which may in light use without power cycling not happen for months), and simple read and write to file does not reflect NVram state: in the moment of writing and reading back it occurs almost certainly to and from volatile RAM.
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 I wanted to see what you guys make of these apps. Does anyone know where I could get a reference guide specifically pertaining to such apps.
Even the "Performance control" feature found in most AOPK Custom Rom's have these weird terms.
Any help would be great.
Here's a picture for reference...sorta
WestxtseW said:
Hi I wanted to see what you guys make of these apps. Does anyone know where I could get a reference guide specifically pertaining to such apps.
Even the "Performance control" feature found in most AOPK Custom Rom's have these weird terms.
Any help would be great.
Here's a picture for reference...sorta
Click to expand...
Click to collapse
init.d -- a system that allows for running services at boot that are not run by the init.rc scripts
swap -- virtual memory. unlike ram, swap is stored on disk/flash storage, and as a result is slower but larger.
dirty -- memory that may need to be written to disk/flash. consider it used.
soft reboot -- a reboot that only restarts high-level system functions (essentially, the android part of android rather than the linux part)
couldn't tell you about the other options in android tweaker. see if it has a help file or similar.
hope it helps!
--ultraviolet
ultravioletnanokitty said:
init.d -- a system that allows for running services at boot that are not run by the init.rc scripts
swap -- virtual memory. unlike ram, swap is stored on disk/flash storage, and as a result is slower but larger.
dirty -- memory that may need to be written to disk/flash. consider it used.
soft reboot -- a reboot that only restarts high-level system functions (essentially, the android part of android rather than the linux part)
couldn't tell you about the other options in android tweaker. see if it has a help file or similar.
hope it helps!
--ultraviolet
Click to expand...
Click to collapse
Thanks! :good: that's pretty much what I'm looking for; leads that help me get my mind around it a bit more
iglo a109 problem
se.. all of those aren`t checked, when i tried to connect, in the photo, they are like that because it was i made a mistake when i created the print screen, so... i don't see how that's the problem, when i connect my phone and then after 2 sec it disconnects itself and starts charging
Hello,
Last months I faced the problem with 'insufficient storage available' message which came out all the time on my phone (CAT B15).
The reason is simple — system updates are installed to the '/data' partition which has only 1 GB and they take around half of available space. I googled and found a lot of ridiculous solutions like 'install app X and it will magically solve all your problems including this', 'put all apps to the SD and you will save additional 40M' etc.
These advices sounded like a meaningless loss of time and I decided to fix the real problem which is lack of space in '/data'. 1 GB is ridiculously low limit for modern device with a lot of apps and updates for Android components.
I have documented the procedure in detail in my blog: vrepin.org/vr/Android-InsufficientSpace/
I would be happy if my post can help to other Android users.
The questions which are still open for me:
- Cyanogen support for CAT? No hope? It was hard to find rooted firmware for CAT phone. I would prefer to simply install cyanogen
- Changing mounting device for '/data'. I have solved this problem by bootup script which remounts it to the proper device (see step 7) but it does not look very straight-forward. Prefer to change system configs but was not able to find the place to change. It looks like '/fstab' is generated on the device start somehow.