Linux TCP优化
2015-06-01 16:26
1106 查看
查看网络连接状态
直接上配置
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
直接上配置
vi /etc/sysctl.conf --------------start------------- # max open files fs.file-max = 51200 # max read buffer net.core.rmem_max = 67108864 # max write buffer net.core.wmem_max = 67108864 # default read buffer net.core.rmem_default = 65536 # default write buffer net.core.wmem_default = 65536 # max processor input queue net.core.netdev_max_backlog = 4096 # max backlog net.core.somaxconn = 4096 # resist SYN flood attacks net.ipv4.tcp_syncookies = 1 # reuse timewait sockets when safe net.ipv4.tcp_tw_reuse = 1 # turn off fast timewait sockets recycling net.ipv4.tcp_tw_recycle = 0 # short FIN timeout net.ipv4.tcp_fin_timeout = 30 # short keepalive time net.ipv4.tcp_keepalive_time = 1200 # outbound port range net.ipv4.ip_local_port_range = 10000 65000 # max SYN backlog net.ipv4.tcp_max_syn_backlog = 4096 # max timewait sockets held by system simultaneously net.ipv4.tcp_max_tw_buckets = 5000 # turn on TCP Fast Open on both client and server side net.ipv4.tcp_fastopen = 3 # TCP receive buffer net.ipv4.tcp_rmem = 4096 87380 67108864 # TCP write buffer net.ipv4.tcp_wmem = 4096 65536 67108864 # turn on path MTU discovery net.ipv4.tcp_mtu_probing = 1 # for high-latency network net.ipv4.tcp_congestion_control = hybla # for low-latency network, use cubic instead # net.ipv4.tcp_congestion_control = cubic --------------end------------- sysctl -p vi /etc/security/limits.conf -------------start------------ * soft nofile 51200 * hard nofile 51200 -------------end------------
相关文章推荐
- 网络异常 检查【此篇文章推荐大家看】
- 三大WEB服务器对比分析(apache ,lighttpd,nginx)
- Rayeager PX2测试tcp与PC机通信的测试程序分享
- [ActionScript 3.0] AS向php发送二进制数据方法之——在URLRequest中构造HTTP协议发送数据
- centos7打开配置https
- Apache Httpd服务器之缓存粗解
- 网络素养公开课笔记(七)
- 用谷歌的AsyncHttpClient简单模仿安卓的AsyncHttpClient,实现异步请求回调函数返回值
- 企业网络似裸奔 信息防护现状不容乐观
- cubieboard网络设置
- file_get_contents无法请求https连接的解决方法
- 企业网络似裸奔 信息防护现状不容乐观
- CNN网络结构层次解析
- ngx_http_access_module语句中allow和deny语句
- 网络素养公开课笔记(六)
- javascript XMLHttpRequest对象全面剖析
- IP包的协议字段
- Tomcat配置虚拟目录、多域名、多个Http监听端口的方式
- TCP慢启动与拥塞控制笔记
- android 内存泄露--加载网络图片--android 12742656-byte external allocation too large for this process.