I found the following solution to clam down the aggressiveness of Ubuntu swapping
-----------------------------------------------------------------------------------------
1- Run the following command
gksudo gedit /etc/sysctl.conf
2- Add the following 2 lines
vm.swappiness=20
vm.vfs_cache_pressure=50
3- Reboot
-----------------------------------------------------------------------------------------
You may also switch off swapping using this command
swapoff -a
Sources:
https://wiki.archlinux.org/index.php/Maximizing_Performance#The_first_thing_to_do
https://help.ubuntu.com/community/SwapFaq#What_is_swappiness_and_how_do_I_change_it.3F
Tweet
Isnt it unsafe to turn swap off?
ReplyDeleteWhat happens when you run out of memory?
Yes you are right, if you get out of memory the OS will hang
ReplyDeleteBut the option is there if you need it for a specific case or if you are testing something