"kswapd0" is taking up some of my device's CPU time even though I don't have any swap. What's going on?
5
votes
1
answer
4779
views
Using Ozcan ROM 6.3 on my Samsung 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
.
**So, 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?
(Originally posted on XDA )
Asked by Baahubali
(51 rep)
Jan 5, 2015, 03:47 PM
Last activity: Dec 6, 2015, 05:50 AM
Last activity: Dec 6, 2015, 05:50 AM