Physical Address
Metro Manila, Philippines
Physical Address
Metro Manila, Philippines
The default Linux kernel behavior is sub-optimal out of the box because it is difficult to anticipate what type of work or workload the operating system will be assigned.
But then again, the Linux kernel is also flexible, and you can even modify the way it works on the fly by dynamically changing some of its parameter using sysctl command. Changes will take effect immediately, or modify /etc/sysctl.conf to make the changes persistent during reboot. But beware of messing it up, for it may cause undesirable behavior or even crash your system.
Using sysctl command, you can optimize your box without having to recompile your kernel, get the results immediately. Here are some of the commonly used kernel parameter for system tuning.
# sysctl -w vm.swappiness = 10 # sysctl -p |
# sysctl -w net.netfilter.nf_conntrack_tcp_loose = 0 # sysctl -p # iptables -A INPUT -m state –state INVALID -j DROP |
# sysctl -w net.ipv4.conf.all.arp_filter = 10 # sysctl -p |
# sysctl -w net.ipv4.netfilter.ip_conntrack_max = 8253128 # sysctl -p |
# sysctl -w vm.dirty_background_ratio = 5 # sysctl -p |
# sysctl -w vm.dirty_ratio = 15 # sysctl -p |
Take note that dirty pages are data that is cached on the RAM waiting to be written on disk.
At the end of the day, the system administrator is responsible to determine the target type of work and workload for a machine and to monitor whether either change over time. The system administrator should ensure that any tunable kernel parameters are set to optimize machine performance.