Reduce swappiness on Manjaro

 

Reduce swappiness

 Swappiness is to optimize the use of Swap and RAM. And it allows establishing the balance between both. By default when Manjaro uses a lot of the RAM memory it starts writing some files into the swap partition on your hard drive. The problem with this is the hard disk is slower than the RAM, so this makes the system slower. You can reduce the use of swap and use more RAM instead.

First, check the default swappiness value. Run in a terminal:

cat /proc/sys/vm/swappiness
Showing the default value of the Swappiness
Showing the default value of the Swappiness

The default value is 60, which is too conservative. I recommend changing the value to 10 if you have more than 4GB of RAM. To do this you need to create the file /etc/sysctl.d/100-manjaro.conf. Run this command:

sudo nano /etc/sysctl.d/100-manjaro.conf

In the file, you have to put the following:

vm.swappiness=10
Setting the value of the Swappiness on 10
Setting the value of the Swappiness on 10

Now, CTRL+O to save and CTRL+X to close the file.

In order for the changes to take effect, reboot the system.

Then, check the swappiness value again:

cat /proc/sys/vm/swappiness

And you’ll see it’s 10. So this way Manjaro will use your RAM memory more efficient.

Checking the new value of swappiness
Checking the new value of swappiness


Reacties

Populaire posts van deze blog

Adjust Color Temperature of Your Screen Using Terminal

CrunchBang++ Linux – The Ultimate Lightweight and Stable Linux Distribution

Snapdrop = AirDrop for Windows, Mac, Linux & Android