- Jan 5, 2015
- 1
- 0
- 0
Disable SWAP permanently
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:
And, my Queries are as follows:
Thanks for reading. Hoping a good response.
Any kind of suggestion or discussion would be greatly appreciated.
Thanks again and a Happy New Year.
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.

Last edited: