Bash script for optimizing performance and hardening Linux kernel by adjusting the kernel parameters. It is self-explained and not supposed to be a one-thing-fit-all script. You should see the script for yourself and adjust the values for your need. Use it with caution.
wget https://raw.githubusercontent.com/djanedu/kernel_tuning/master/kernel_tuning_centos.sh
chmod +x ./kernel_tuning_centos.sh
./kernel_tuning_centos.sh
mv ./kernel_tuning_centos.sh /opt/
vim /etc/rc.local
# Add the following line:
/opt/kernel_tuning_centos.sh
wget https://raw.githubusercontent.com/djanedu/kernel_tuning/master/kernel_tuning_ubuntu.sh
chmod +x ./kernel_tuning_ubuntu.sh
./kernel_tuning_ubuntu.sh
I made the script using the following sources:
- http://docs.oracle.com/cd/E19644-01/817-5051/pt_tuningos.html#wp62221
- http://www.netadmintools.com/art295.html
- https://cs.uwaterloo.ca/~brecht/servers/openfiles.html
- http://www.nateware.com/linux-network-tuning-for-2013.html
- http://www.lognormal.com/blog/2012/09/27/linux-tcpip-tuning/
- http://aiscaler.com/wiki/linux-tuning-for-high-performance
- http://www.cyberciti.biz/faq/linux-tcp-tuning/
- https://www.frozentux.net/ipsysctl-tutorial/ipsysctl-tutorial.html
- http://www.susegeek.com/networking/network-performance-fine-tuning-in-opensuse-suse/
Feel free to make it better. Pull requests are welcome.