How to Configure Swappiness in *Buntu Distributions

The term swappiness probably sounds absolutely ridiculous to you, but it’s actually a real Linux kernel parameter that controls how readily the system swaps out runtime memory from RAM pages over to the swap file or partition. Swappiness is expressed as a percentage out of a possible 100.

The code vm.swappiness = 100 would swap so aggressively that your system would be almost unusuable while vm.swappiness = 0 would only swap to prevent an out of memory halt.

Ubuntu Linux as well as the LXDE-based Lubuntu, Xfce-based Xubuntu and all other *Buntu Linux systems default to vm.swappiness = 60, which is fine for servers, but it’s too aggressive a policy for most home and mobile device users. There’s a way to correct this however.

Configuring *Buntu swappiness.

Get to a graphical command line either by holding CTRL, ALT and T or opening it from a root menu depending on how you have Ubuntu, Lubuntu or Xubuntu configured.

Then type the command

2016-09-24_092927

followed by enter.

swappiness

You’ll need to either run sudo sysctl -p from the command line or reboot to make the change take. After that type swapon -s to make sure that you’re not using more of the swap file than you should be.

Kevin Arrows
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Expert Tip

How to Configure Swappiness in *Buntu Distributions

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested