No Swap partition, but system monitor shows 2GB swap consumption, why?
Solution 1:
You don't see a swap partition, because you're using a 2G /swapfile, and it's too small.
Note: You really need to add more RAM for your usage pattern.
Until then, we'll increase your /swapfile from 2G to 4G, and that should stop any freezing/crashing that you may have...
Note: Incorrect use of the rm
and dd
commands can cause data loss. Suggest copy/paste.
In the terminal
...
sudo swapoff -a # turn off swap
sudo rm -i /swapfile # remove old /swapfile
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096
sudo chmod 600 /swapfile # set proper file protections
sudo mkswap /swapfile # init /swapfile
sudo swapon /swapfile # turn on swap
free -h # confirm 8G RAM and 4G swap
Edit /etc/fstab, using sudo -H gedit /etc/fstab
or sudo pico /etc/fstab
.
Confirm this /swapfile line in /etc/fstab... and confirm no other “swap” lines... use SPACES in this line... confirm NO TABS...
/swapfile none swap sw 0 0
reboot # reboot and verify operation