Get current value:
cat /proc/sys/vm/swappiness
Use sysctl change value for temporaly:
sysctl vm.swappiness=10 or save value there /etc/sysctl.conf
swappiness=0 tells the kernel to avoid swapping processes out of physical memory for as long as possible
swappiness=100 tells the kernel to aggressively swap processes out of physical memory and move them to swap cache
Disable swapping:
echo 0 > /proc/sys/vm/swappiness