So, I have 786 MB RAM with 1.6 GB Swap. I want to increase the usage of swap. In other words, i want my Ubuntu to use more Swap than My RAM. Please Tell me, how to do it
1 Answer
If you want to increase the usage of swap, you can adjust Ubuntu's swappiness which has a default value of 60 by editing
sudo gedit /etc/sysctl.conf
and changing or adding the value of
vm.swappiness = 80
or any number between 0 (swap disabled) to 100 (swap used all the time).
However the default setting of 60 should be fine for your use case.
see also swappiness
-
but people say that it slows down my PC!– user204653Nov 5, 2013 at 7:28
-
Yes, as I said the default should be fine for you and using more swap memory will probably not lead to better performance (adding more RAM memory will). This would how ever be the answer to your question of how to make Ubuntu use swap more.– MinosNov 5, 2013 at 7:30
-
1Test it for a few days. Also be sure to check the results with a watch-clock. I've ran
vm.swappiness = 100
for years without problems.– MadMikeNov 5, 2013 at 7:32