Disable Swapping – Ubuntu


If your PC has more than 1 gb of memory you could disable something called swapping for an overall speed boost in Ubuntu.

What is this swapping?

Swappiness takes a value between 0 and 100 to change the balance between swapping applications and freeing cache. At 100, the kernel will always prefer to find inactive pages and swap them out; in other cases, whether a swapout occurs depends on how much application memory is in use and how poorly the cache is doing at finding and releasing inactive items.

First we need to open Ubuntu’s terminal. Click “Applications”, “Accessories” and click “Terminal”. You should now see a window like this…

11.thumbnail Disable Swapping   Ubuntu

Copy & paste this text into the terminal:

sudo gedit /etc/sysctl.conf

Your window should now look something like this…

21.thumbnail Disable Swapping   Ubuntu

Press enter on your keyboard and this window now opens…

3.thumbnail Disable Swapping   Ubuntu

In this window scroll all the way to the bottom and add this line of text:

vm.swappiness=0

Your window should now look something like this…

41.thumbnail Disable Swapping   Ubuntu

All that is left to do is click “Save”, close the window, and reboot your PC for the changes to take effect.