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:
Add swappiness setting:
sudo nano /etc/sysctl.conf
At the bottom of the file, add:
sysctl vm.swappiness = 1
Reboot for settings to take effect.
Since basic usage for this rig is ~4GB RAM, swap is set to a the minimum for remaining active (1% of RAM).