Saturday, July 25, 2015

Good System Performance on Ubuntu / Linux

Good System Performance on Ubuntu / Linux


The default value of swappiness in Ubuntu is 60, and it recommends swappiness=10 for Ubuntu to improve overall performance.

Temporarily change swappiness’ value to 10 using following command, and it will be reverted in next restart.

ubuntu@ip-192-168-100-222:~$ sudo sysctl vm.swappiness=10

Increasing this causes file-caches to be thrown away rather than swapped out to disk. Opening files will be a tiny amount slower, but switching between applications will be faster.

Temporarily change cache value to 50 and it will be reverted in next restart.

ubuntu@ip-192-168-100-222:~$ sudo sysctl vm.vfs_cache_pressure=50


To permanently change this value, using:

ubuntu@ip-192-168-100-222:~$ sudo vi /etc/sysctl.conf

vm.swappiness = 10
vm.vfs_cache_pressure = 50

2 comments:

Gitlab Automation Project Showcase

My GitLab Projects Showcase 🚀 Welcome to my portfolio of GitLab projects. Each repository reflects my journey as an engineer, focusing...