Linux filesystem tune-up for less IO and more memory usage

[Updated on 29.Oct.2018]

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 = 0
vm.dirty_writeback_centisecs = 1000
vm.dirty_expire_centisecs = 10000
vm.dirty_background_ratio=20
vm.dirty_ratio = 60

and then reload active settings with:

sysctl -p

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:

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Leave a Reply

Your email address will not be published. Required fields are marked *

*

code