I figure it's a good idea to have a central question for linux network tuning. I'm particularly interested in tuning options for the following.
- Web server
- Varnish / Squid server
- DB server
- File server
- App server
closed as too broad by HopelessN00b Dec 5 '14 at 10:49
There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.
At this point it's generally not worth the overhead of "tuning" within the kernel. Unless you have the test gear (or a cluster to A/B options on) and very good documentation it's not worth it for the sys-admin overhead alone.
These days the linux kernel has good auto-tuning of TCP, you can do better, however those are not the default because they're seen to be "greedy" and not fair on the Internet.
As close as I get to tuning is:
With rare exceptions those three will get you 90% there.
network stack tuning i put on routers/firewalls connecting to net hundreds of users
[ mostly empirically tweaked over years based on some unpleasant crashes ]
for file/sql/poroxy server you definitivly want to mount partition with data/spool with noatime,nodiratime and for reiserfs - notail ] to avoid additional disk trashing whenever file is accessed for read.
and you really want [ maybe you don't know about it yet ;-] gather statistics - eg with munin - to do some capacity planning and see if your tuning indeed decreases system load.
One thing you may want to look at web100. It is a kernel patch, and a userland too designed to optimized the Linux kernel for high-performance networks.
Also check out High Performance SSH/SCP.