Friday, November 23, 2012

Reducing "swappiness" of swap space

This page contains useful information on swap space in Linux. By swap space, I mean one or several swap files. I need only one swap file. There are two things that I need. The first is to empty my swap space because it is problematic sometimes to multitasking performance. The other thing is to reduce "swappiness" of the swap space.

To change the swappiness, run the following code

sudo gedit /etc/sysctl.conf

and add


at the end of the file. The value must lie in the interval 1-100. Now, there is a lower chance of RAM being put in the swap space. If I want to clean the swap space, I run the following

sudo swapoff -a
sudo /sbin/mkswap /dev/hda8
sudo swapon -a

No comments:

Post a Comment