Linux filesystem tune-up for less IO and more memory usage
As opposed to Windows, Linux and Unix systems allow user to tweak huge number of things. Most of these extra fine-grain-fine-tune-tiny-hidden-options are inside kernel, which is the core of any OS. Today I’ll show you how to tune Linux filesystem to use less IO requests, use a bit more memory.
In file /etc/sysctl.conf add the following lines
vm.swappiness = 15 vm.dirty_writeback_centisecs = 3000 vm.dirty_expire_centisecs = 30000 vm.dirty_background_ratio=30 vm.dirty_ratio = 60
and then reload active settings with:
These settings will make Linux swap only if less than 15% of memory available (default is 60). Dirty-data writeback is also increased approx 10 times.
Do these changes on your own risk. These values increase risk of damaged filesystem on power failure during high activity. Make sure, that your storage is battery (ups) protected.
More useful links:
- parameter explanation https://www.kernel.org/doc/Documentation/sysctl/vm.txt
- a bit crappy text, but still might be useful: http://www.cyberciti.biz/faq/linux-kernel-tuning-virtual-memory-subsystem/