Since Ubuntu 10.11 I spotted that Ubuntu is sometimes getting extreme sluggish on my Atom Netbook and starts to swap even though I have plenty of free memory.
Swap memory is used as an alternative to RAM. It is a small partition in the hard disk, that is used to give your system extra memory when your RAM is full. However, it is not as efficient as RAM and quite slow.
By default the swappiness is set to 60 for Ubuntu.
The swappiness parameter controls the tendency of the kernel to move processes out of physical memory and onto the swap disk. Because disks are much slower than RAM, this can lead to slower response times for system and applications if processes are too aggressively moved out of memory.
Swappiness have values between 0 to 100. If it is zero it will fully utilize your RAM before using any swap memory.If it is 100 your system will use negligible RAM. The default value of swappiness in Ubuntu is 60. Now you know, why your system uses only half of your system RAM.
Well lets take care of it. A swappiness of 10 is recommended but you can keep it to 0 too. This is how we are going to reduce swappiness to 10.
Enter the following command in your terminal to check your swapiness:
cat /proc/sys/vm/swappiness
It will return some values like 60 or 10 or whatever the value is.
To change the swappiness type this command:
gksudo gedit /etc/sysctl.conf
It will open a text configuration file. Search for vm.swappiness and change its value as desired. Ifvm.swappiness does not exist, add it to the end of the file like so:
vm.swappiness=10
Save the file and Restart your system. Now you won’t have any slow downs as now less memory will be moved to the swap disk.
Swap Memory is used as an alternative to RAM. It is a small partition in the hard disk, that is used to give your system extra memory when your RAM is full. However, it is not as efficient as RAM and quite slow.
By default the swappiness is set to 60 for Ubuntu. Here is a explanation for swappiness from Ubuntu Wiki:
The swappiness parameter controls the tendency of the kernel to move processes out of physical memory and onto the swap disk. Because disks are much slower than RAM, this can lead to slower response times for system and applications if processes are too aggressively moved out of memory.
Swappiness have values between 0 to 100. If it is zero it will fully utilize your RAM before using any swap memory.If it is 100 your system will use negligible RAM. The default value of swappiness in Ubuntu is 60. Now you know, why your system uses only half of your system RAM.
Well lets take care of it. A swappiness of 10 is recommended but you can keep it to 0 too. This is how we are going to reduce swappiness to 10.
Enter the following command in your terminal to check your swapiness:
cat /proc/sys/vm/swappiness
It will return some values like 60 or 10 or whatever the value is.
To change the swappiness type this command:
gksudo gedit /etc/sysctl.conf
It will open a text configuration file. Search for vm.swappiness and change its value as desired. Ifvm.swappiness does not exist, add it to the end of the file like so:
vm.swappiness=10
Save the file and Restart your system. Now you won’t have any slow downs as now less memory will be moved to the swap disk.
If you are not comfortable with all these tweaks and want a simple way for this, there is an alternative.
Download Ailurus from here (download .deb for Ubuntu). It is an excellent tweaking utility for Ubuntu and you won’t need to use terminal for it.
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.