Skip to content

swap

check swap

use htop.

create swap

sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

delete swap

sudo swapoff /swapfile
sudo rm /swapfile

check swap file location

sudo swapon -s

# or
sudo cat /proc/swaps

kswapd0 high CPU usage.

This is usually caused by unmounted Swap if there is not enough memory.

See the second answer here.