Mon blog
Linux - Optimisation
Created 25/02/2010 10:50
Linux optimization tricks
In this article, I will record all the little tricks I found to optimize the performances of my linux machine.
How to control linux swapping tendancy
Parameter used to control this behavior :
/proc/sys/vm/swappiness
On my own computer it's value is 60. As I want to avoid swapping, I decrease this value to 10. For that you have 2 possibilities :
- one shot command that will be lost after a reboot : "echo 10 > /proc/sys/vm/swappiness"
- modify sysctls files : for example add vm.swappiness to /etc/sysctl.conf file - it will be applied after each boot
Changing linux cache behavior
/proc/sys/vm/vfs_cache_pressure
By default the value of this parameter is 100. Under this value the system will prefer to retain inode in memory than block cache. Try with 50, the gain is quite huge.
Some Links on the same subject