Disabling Ubuntu Swap for Machines With High RAM

Case: Optimizing Intel NUC with 16GB RAM, SSD, Xubuntu 18.04, for non-demanding usage (primarily web browsing and text-editing).

Setting Swappiness on Ubuntu

Checking current swappiness setting:

cat /proc/sys/vm/swappiness

Add swappiness setting:

sudo nano /etc/sysctl.conf

At the bottom of the file, add:

vm.swappiness=1

Reboot for settings to take effect.

About Swappiness

The Linux kernel’s swappiness setting defines how aggressively the kernel will swap memory pages versus dropping pages from the page cache. A higher value increases swap aggressiveness, while a lower value tells the kernel to swap as little as possible to disk and favor RAM. The swappiness range is from 0 to 100, and most Linux distributions have swappiness set to 60 by default.
https://docs.couchbase.com/server/current/install/install-swap-space.html

 

Additional Info

 

Did this solve your issue?