Ubuntu swap & ram

gksudo gedit /etc/sysctl.conf
#append or modify (if already exists) the following:
#0 .. 100 (0 = no swap)

# http://askubuntu.com/questions/1357/how-to-empty-swap-if-there-is-free-ram
# swap info
swapon -s
cat /proc/swaps
vmstat 1
systemctl list-units --type=swap
systemctl list-units | grep \.swap
# clear swap cache
sudo swapoff -a
sudo swapon -a

# comment swap lines in /etc/fstab and stop & mask them with systemd:
sudo systemctl status dev-sda3.swap
sudo systemctl stop dev-sda3.swap
# or stop and disable the swap:
sudo systemctl --now mask dev-sda3.swap

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.