Bitcoin donations are welcome:14snQXeLcnJtWUduKZ6rC2MHdPYrYar1Tw

Friday, June 29, 2018

Solution: kswapd0 using 100% cpu

So I googled a lot about this problem without finding any proper solutions for this problem. Some suggested disabling swappiness (=how long should the computer wait before disposing memory to swap in stead of RAM). But this only delayed the problem with full cpu load.

I researched a bit more by my self. It looks like the problem is kswapd0 is unable to store anything at the SWAP memory. So I tried formating/restoring the SWAP partition. I use LVM, but the procedure is the same for those without LVM.

Do the following:
> su
Get root credentials
> cat /ets/fstab
Find out the location of your SWAP partition. It's either /dev/something or if you are using LVM it can look like /dev/mapper/SOMETHING--vg-SOMETHING_1. Next turn off swap:
> swapoff /dev/mapper/SOMETHING--vg-SOMETHING_1
Then check & format swap:
> mkswap -c -L swap /dev/mapper/SOMETHING--vg-SOMETHING_1
And enable swap again
> swapon /dev/mapper/SOMETHING--vg-SOMETHING_1