How To: Network / TCP / UDP Tunin

982阅读 0评论2010-04-26 skybin090804
分类:LINUX

This is a very basic step by step description of how to improve the performance networking (TCP & UDP) on Linux 2.4+ for high-bandwidth applications.  These settings are especially important for GigE links.  Jump to  or  Assumptions This howto assumes that the machine being tuned is involved in supporting high-bandwidth applications.  Making these modifications on a machine that supports multiple users and/or multiple connections is not recommended - it may cause the machine to deny connections because of a lack of memory allocation. The Steps Quick Step Cut and paste the following into a linux shell with root privleges:

sysctl -w net.core.rmem_max=8388608
sysctl -w net.core.wmem_max=8388608
sysctl -w net.core.rmem_default=65536
sysctl -w net.core.wmem_default=65536
sysctl -w net.ipv4.tcp_rmem='4096 87380 8388608'
  sysctl -w net.ipv4.tcp_wmem='4096 65536 8388608'
  sysctl -w net.ipv4.tcp_mem='8388608 8388608 8388608'
sysctl -w net.ipv4.route.flush=1
上一篇:lvs说明:目前有三种IP负载均衡技术八种调度算法记录
下一篇:下载服务器中 tcp内核参数的一些调整