While using relatively low RAM memory (1 GB or less) the system tends to be too slow and accesses the hard disk too much.
There is a partition on hard disk called SWAP which is also called virtual memory.
Too much swap usage slows down the computer.
To check the actual swappiness value, type in the terminal window:
cat /proc/sys/vm/swappiness
Press Enter
The result will probably be 60, and we need to change it to 10.
To change the value of swappiness we must sudo edit the /etc/sysctl.conf file
Scroll down the text file and you will find add your swappiness parameter to override the default.
Copy/Paste the following lines:
# # Decrease swap usage to a more reasonable leve vm.swappiness=10
Save the text and close the file, and reboot your computer.
After reboot, check the swappiness value by typing in the terminal window:
cat /proc/sys/vm/swappiness
Press Enter.
Now it should be 10.
NOTE: You can even decrease the value for better performance, the ideal value of swappiness for:
- 1GB RAM or more: swappiness at 10
- Less than 1 GB RAM: swappiness at 5