How to set the swappiness value?
Swappiness in the file should be set to 10. Skipping this step may cause poor performance, whereas setting it to 10 will cause a swap which act as an emergency buffer, preventing out-of-memory crashes.
You can do this with the following commands:
echo 10 | sudo tee /proc/sys/vm/swappiness
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf