订阅所有JSP/Servlet的日志 订阅 | 这是最新一篇日志 上一篇 | 下一篇日志 下一篇 ]
freeBSD

Automatic TCP send and receive socket buffer size

附件
patch-tcp_auto_buf-20061212-releng_6.diff.txt(13.4 K)
 
切换到幻灯片模式

This is a patch adding automatic TCP send and receive socket buffer sizing.
Normally the socket buffers are static (either derived from global defaults
or set with setsockopt) and do not adapt to real network conditions. Two
things happen: a) your socket buffers are too small and you can't reach the
full potential of the network between both hosts; b) your socket buffers are
too big and you waste a lot of kernel memory for data just sitting around.

With automatic TCP send and receive socket buffers we can start with a small
buffer and quickly grow it in parallel with the TCP congestion window to match
real network conditions.

FreeBSD has a default 32K send socket buffer. This supports a maximal
transfer rate of only slightly more than 2Mbit/s on a 100ms RTT trans-
continental link. Or at 200ms just above 1Mbit/s. With TCP send buffer
auto scaling and the default values below it supports 20Mbit/s at 100ms
and 10Mbit/s at 200ms. That's an improvement of factor 10, or 1000%.
For the receive side it looks slightly better with a default of 64K buffer
size.

The automatic send buffer sizing patch is currently running on one half of
the FTP.FreeBSD.ORG cluster w/o any problems so far. Against this machine
with the automatic receive buffer sizing patch I can download at 5.7MBytes
per second. Without patch it maxed out at 1.6MBytes per second as the delay
bandwidth product became equal to the static socket buffer size without hitting
the limits of the physical link between the machines. My test machine is about
35ms from that FTP.FreeBSD.ORG and connected through a moderately loaded 100Mbit
Internet link.

New sysctl's are:

net.inet.tcp.sendbuf_auto=1 (enabled)
net.inet.tcp.sendbuf_inc=8192 (8K, step size)
net.inet.tcp.sendbuf_max=262144 (256K, growth limit)
net.inet.tcp.recvbuf_auto=1 (enabled)
net.inet.tcp.recvbuf_inc=16384 (16K, step size)
net.inet.tcp.recvbuf_max=262144 (256K, growth limit)

The patch is available here (it may apply with some fuzz):

http://people.freebsd.org/~andre/tcp_auto_buf-20061212.diff

Any tests and test reports are very welcome.

平均得分
(0 次评分)





文章来自: 本站原创
标签: Tcp FreeBSD socket buffer tune 
评论: 3 | 查看次数: 13553
  • 共有 3 条评论
游客 [2008-11-18 19:59:05]
游客 [2008-09-29 09:14:41]
游客 [2008-08-01 17:06:02]
移民
投资移民
加拿大移民
技术移民
移民加拿大
澳洲技术移民
德国移民
移民澳洲
澳洲移民
出国移民
移民出国
英国移民
澳大利亚移民
加拿大投资移民
加拿大技术移民
美国留学
法国留学
北欧留学
瑞典留学
芬兰留学
澳洲留学
除湿机
抽湿机
工业除湿机
空气净化器
空气净化机
步进电机
联轴器
真空泵
工作服
职业装
北京工作服
定做工作服
北京二手空调回收
空调维修
物资回收
防腐设备
风机
铠装热电偶
精密铸造
美术培训
美术高考
美术高考培训
画室
北京画室
谐波治理
无功补偿
防腐管道
英美制丝锥
继电保护测试仪
日语学校
日语培训
安装卫星电视
安装卫星天线
北京安装卫星电视
北京安装卫星天线
针孔摄像机
望远镜
夜视仪
探测狗
窃听器
无线耳机
屏蔽器
金属探测器
隔墙监听器
国标舞
拉丁舞
喷码机
针孔摄像机
烤瓷牙
除沫器
土壤水分速测仪
土壤水分测定仪
土壤水分测量仪
土壤墒情记录仪
农药残留速测仪
土壤化肥速测仪
土壤养分测试仪
信号隔离器
信号分配器
隔离器
温度变送器
电流变送器
配电器
隔离配电器
隔离模块
糖尿病足
煤气发生炉
高低温试验箱
振动试验台
恒温恒湿试验箱
恒温恒湿箱
恒温箱
振动台
盐雾箱
老化台
盐雾试验箱
高低温箱
低温试验箱
振动试验机
合同纠纷
房产纠纷
劳动纠纷
房地产律师
制氮机
在职研究生
液体壁纸
清水模板
冷弯型钢
roll forming
开口闪点仪
凝固点仪
闭口闪点仪
运动粘度仪
粘度仪
抗乳化测定仪
丝网除沫器
气液过滤网
除雾器
丝网除雾器
波纹填料
三菱电机空调
牛仔服
牛仔服装厂
牛仔休闲
牛仔裤
牛仔品牌
牛仔专卖店
虹吸
虹吸雨水
虹吸排水
有压流
同层排水
walk throught metal detector
恒温器
马达保护器
热保护器
温度开关
温控器
过流保护器
藏獒
Google左侧优化
舞台设计
铅丝笼
石笼网
烧烤网
振动筛网
拖链
光纤熔接机
光缆监测系统
光时域反射仪
OTDR
nike shoes
air jordan
不锈钢反应斧
  • 共有 3 条评论
发表评论
昵 称:  登录
内 容:
选 项:
字数限制 1000 字 | UBB代码 开启 | [img]标签 开启