Change swappiness in Ubuntu

#check current value
cat /proc/sys/vm/swappiness

#edit /etc/sysctl.conf and append the following line
vm.swappiness=10