事实 (请标明任何虚假陈述):
两个相距80毫秒的站点之间有100 Mbps的连接
这是一个很长的连接,可以从大的TCP窗口大小中受益,大小可能高达100 Mbps * 0.08 sec = 1,000,000字节
两台机器都运行Windows Server 2012.“接收窗口自动调整级别”在两者上都是正常的。 两个“窗口缩放启发式”都禁用。
我在一边跑了“iperf -s”,而在另一边跑了“iperf -c”。 转移发生在5 Mbps。 我得到相同的结果朝另一个方向。
双方都宣称支持在SYN中使用TCP滑动窗口。
接收器在整个运行期间请求TCP窗口大小为64,512字节(0xFC00),TCP窗口比例值为“无移位”(0x000)。
networking能够处理更大的窗口大小(请参见下面的序列图)
接收器保持窗口小于networking支持
这个连接发生在一个IPSEC VPN内。 隧道接口的MTU在两个方向上减less到1400字节。
题
无答案
networking坏了
运行在同一networking上的Linux机器将TCP窗口打开到1.5兆字节,并以6倍带宽传输数据
启用窗口缩放启发式
窗口缩放启发式被禁用(见下面的“netsh interface tcp show heuristics”的输出)
接收窗口自动调谐级别不正常
接收窗口自动调谐级别正常(请参阅下面的“netsh interface tcp show global”的输出)
这在ESXi中的虚拟机上不起作用
在同一主机上运行的虚拟Linux机器上,性能提高了6倍。
2015年6月12日更新 4:30 pm PDT
我通过把linux放在连接的一端来修改testing。 果然,当Linux发送数据到Windows Server 2012时,Windows提供了一个太小的TCP接收窗口(64,512字节)。
当我将数据从Windows发送到Linux时,linux提供了一个足够大的TCP接收窗口(1,365,120字节)。 但是,Windows限制发送到飞行中最多〜60,000字节。
更新 2015年6月13日下午3:00 PDT
更接近根本原因。 在我的设置中,SO_SNDBUF和SO_RCVBUF都没有设置(由iperf)。 这些是有效绑定接收窗口的发送和接收缓冲区。 如果不指定这些值,则Windows Server 2012将提供64 kB的默认值。 所以现在的问题是:
题
无答案
“netsh winsock show autotuning”被禁用
它被启用。
更新 2015年8月24日下午4:00 PDT
netsh显然已经被Set-NetTCPSetting和family所取代。 Get-NetTCPSetting结合Get-NetTCPConnection显示我在“Internet”机制中运行,它提供给我这些设置:
SettingName : Internet MinRto(ms) : 300 InitialCongestionWindow(MSS) : 4 CongestionProvider : CTCP CwndRestart : False DelayedAckTimeout(ms) : 50 MemoryPressureProtection : Enabled AutoTuningLevelLocal : Normal AutoTuningLevelGroupPolicy : NotConfigured AutoTuningLevelEffective : Local EcnCapability : Enabled Timestamps : Disabled InitialRto(ms) : 3000 ScalingHeuristics : Disabled DynamicPortRangeStartPort : 49152 DynamicPortRangeNumberOfPorts : 16384
发件人TCP设置
PS C:\Users\acs> netsh interface tcp show global Querying active state... TCP Global Parameters ---------------------------------------------- Receive-Side Scaling State : enabled Chimney Offload State : disabled NetDMA State : disabled Direct Cache Access (DCA) : disabled Receive Window Auto-Tuning Level : normal Add-On Congestion Control Provider : none ECN Capability : enabled RFC 1323 Timestamps : disabled Initial RTO : 3000 Receive Segment Coalescing State : enabled PS C:\Users\acs> netsh interface tcp show heuristics TCP Window Scaling heuristics Parameters ---------------------------------------------- Window Scaling heuristics : disabled Qualifying Destination Threshold : 3 Profile type unknown : normal Profile type public : normal Profile type private : normal Profile type domain : normal PS C:\Users\acs> Get-NetTCPSetting SettingName : Automatic MinRto(ms) : InitialCongestionWindow(MSS) : CongestionProvider : CwndRestart : DelayedAckTimeout(ms) : MemoryPressureProtection : AutoTuningLevelLocal : AutoTuningLevelGroupPolicy : AutoTuningLevelEffective : EcnCapability : Timestamps : InitialRto(ms) : ScalingHeuristics : DynamicPortRangeStartPort : DynamicPortRangeNumberOfPorts : SettingName : Custom MinRto(ms) : 20 InitialCongestionWindow(MSS) : 4 CongestionProvider : DCTCP CwndRestart : True DelayedAckTimeout(ms) : 10 MemoryPressureProtection : Enabled AutoTuningLevelLocal : Normal AutoTuningLevelGroupPolicy : NotConfigured AutoTuningLevelEffective : Local EcnCapability : Enabled Timestamps : Disabled InitialRto(ms) : 3000 ScalingHeuristics : Disabled DynamicPortRangeStartPort : 49152 DynamicPortRangeNumberOfPorts : 16384 SettingName : Compat MinRto(ms) : 300 InitialCongestionWindow(MSS) : 2 CongestionProvider : Default CwndRestart : False DelayedAckTimeout(ms) : 200 MemoryPressureProtection : Enabled AutoTuningLevelLocal : Normal AutoTuningLevelGroupPolicy : NotConfigured AutoTuningLevelEffective : Local EcnCapability : Enabled Timestamps : Disabled InitialRto(ms) : 3000 ScalingHeuristics : Disabled DynamicPortRangeStartPort : 49152 DynamicPortRangeNumberOfPorts : 16384 SettingName : Datacenter MinRto(ms) : 20 InitialCongestionWindow(MSS) : 4 CongestionProvider : DCTCP CwndRestart : True DelayedAckTimeout(ms) : 10 MemoryPressureProtection : Enabled AutoTuningLevelLocal : Normal AutoTuningLevelGroupPolicy : NotConfigured AutoTuningLevelEffective : Local EcnCapability : Enabled Timestamps : Disabled InitialRto(ms) : 3000 ScalingHeuristics : Disabled DynamicPortRangeStartPort : 49152 DynamicPortRangeNumberOfPorts : 16384 SettingName : Internet MinRto(ms) : 300 InitialCongestionWindow(MSS) : 4 CongestionProvider : CTCP CwndRestart : False DelayedAckTimeout(ms) : 50 MemoryPressureProtection : Enabled AutoTuningLevelLocal : Normal AutoTuningLevelGroupPolicy : NotConfigured AutoTuningLevelEffective : Local EcnCapability : Enabled Timestamps : Disabled InitialRto(ms) : 3000 ScalingHeuristics : Disabled DynamicPortRangeStartPort : 49152 DynamicPortRangeNumberOfPorts : 16384
发件人SYN
No. Time Source Destination Protocol Length Delta Sequence number Acknowledgment number Bytes in flight Calculated window size Info 814 5.036577000 10.10.0.21 10.11.0.1 TCP 66 0.000000000 0 0 64512 49758→5001 [SYN, ECN, CWR] Seq=0 Win=64512 Len=0 MSS=1460 WS=1 SACK_PERM=1 Frame 814: 66 bytes on wire (528 bits), 66 bytes captured (528 bits) on interface 0 Ethernet II, Src: 00:11:22:33:44:55, Dst: aa:bb:cc:dd:ee:ff Internet Protocol Version 4, Src: 10.10.0.21 (10.10.0.21), Dst: 10.11.0.1 (10.11.0.1) Transmission Control Protocol, Src Port: 49758 (49758), Dst Port: 5001 (5001), Seq: 0, Len: 0 Source Port: 49758 (49758) Destination Port: 5001 (5001) [Stream index: 73] [TCP Segment Len: 0] Sequence number: 0 (relative sequence number) Acknowledgment number: 0 Header Length: 32 bytes .... 0000 1100 0010 = Flags: 0x0c2 (SYN, ECN, CWR) Window size value: 64512 [Calculated window size: 64512] Checksum: 0x1451 [validation disabled] Urgent pointer: 0 Options: (12 bytes), Maximum segment size, No-Operation (NOP), Window scale, No-Operation (NOP), No-Operation (NOP), SACK permitted Maximum segment size: 1460 bytes No-Operation (NOP) Window scale: 0 (multiply by 1) Kind: Window Scale (3) Length: 3 Shift count: 0 [Multiplier: 1] No-Operation (NOP) No-Operation (NOP) TCP SACK Permitted Option: True
序列图的发送者视angular
接收器TCP设置
PS C:\Users\acs> netsh interface tcp show global Querying active state... TCP Global Parameters ---------------------------------------------- Receive-Side Scaling State : enabled Chimney Offload State : disabled NetDMA State : disabled Direct Cache Access (DCA) : disabled Receive Window Auto-Tuning Level : normal Add-On Congestion Control Provider : none ECN Capability : enabled RFC 1323 Timestamps : disabled Initial RTO : 3000 Receive Segment Coalescing State : enabled PS C:\Users\acs> netsh interface tcp show heuristics TCP Window Scaling heuristics Parameters ---------------------------------------------- Window Scaling heuristics : disabled Qualifying Destination Threshold : 3 Profile type unknown : normal Profile type public : normal Profile type private : normal Profile type domain : normal PS C:\Users\acs> Get-NetTCPSetting SettingName : Automatic MinRto(ms) : InitialCongestionWindow(MSS) : CongestionProvider : CwndRestart : DelayedAckTimeout(ms) : MemoryPressureProtection : AutoTuningLevelLocal : AutoTuningLevelGroupPolicy : AutoTuningLevelEffective : EcnCapability : Timestamps : InitialRto(ms) : ScalingHeuristics : DynamicPortRangeStartPort : DynamicPortRangeNumberOfPorts : SettingName : Custom MinRto(ms) : 20 InitialCongestionWindow(MSS) : 4 CongestionProvider : DCTCP CwndRestart : True DelayedAckTimeout(ms) : 10 MemoryPressureProtection : Enabled AutoTuningLevelLocal : Normal AutoTuningLevelGroupPolicy : NotConfigured AutoTuningLevelEffective : Local EcnCapability : Enabled Timestamps : Disabled InitialRto(ms) : 3000 ScalingHeuristics : Disabled DynamicPortRangeStartPort : 49152 DynamicPortRangeNumberOfPorts : 16384 SettingName : Compat MinRto(ms) : 300 InitialCongestionWindow(MSS) : 2 CongestionProvider : Default CwndRestart : False DelayedAckTimeout(ms) : 200 MemoryPressureProtection : Enabled AutoTuningLevelLocal : Normal AutoTuningLevelGroupPolicy : NotConfigured AutoTuningLevelEffective : Local EcnCapability : Enabled Timestamps : Disabled InitialRto(ms) : 3000 ScalingHeuristics : Disabled DynamicPortRangeStartPort : 49152 DynamicPortRangeNumberOfPorts : 16384 SettingName : Datacenter MinRto(ms) : 20 InitialCongestionWindow(MSS) : 4 CongestionProvider : DCTCP CwndRestart : True DelayedAckTimeout(ms) : 10 MemoryPressureProtection : Enabled AutoTuningLevelLocal : Normal AutoTuningLevelGroupPolicy : NotConfigured AutoTuningLevelEffective : Local EcnCapability : Enabled Timestamps : Disabled InitialRto(ms) : 3000 ScalingHeuristics : Disabled DynamicPortRangeStartPort : 49152 DynamicPortRangeNumberOfPorts : 16384 SettingName : Internet MinRto(ms) : 300 InitialCongestionWindow(MSS) : 4 CongestionProvider : CTCP CwndRestart : False DelayedAckTimeout(ms) : 50 MemoryPressureProtection : Enabled AutoTuningLevelLocal : Normal AutoTuningLevelGroupPolicy : NotConfigured AutoTuningLevelEffective : Local EcnCapability : Enabled Timestamps : Disabled InitialRto(ms) : 3000 ScalingHeuristics : Disabled DynamicPortRangeStartPort : 49152 DynamicPortRangeNumberOfPorts : 16384
接收器SYN
No. Time Source Destination Protocol Length Delta Sequence number Acknowledgment number Bytes in flight Calculated window size Info 817 5.110501000 10.11.0.1 10.10.0.21 TCP 70 0.073924000 0 1 64512 5001→49758 [SYN, ACK, ECN] Seq=0 Ack=1 Win=64512 Len=0 MSS=1460 WS=1 SACK_PERM=1 [ETHERNET FRAME CHECK SEQUENCE INCORRECT] Frame 817: 70 bytes on wire (560 bits), 70 bytes captured (560 bits) on interface 0 Ethernet II, Src: aa:bb:cc:dd:ee:ff, Dst: 00:11:22:33:44:55 Internet Protocol Version 4, Src: 10.11.0.1 (10.11.0.1), Dst: 10.10.0.21 (10.10.0.21) Transmission Control Protocol, Src Port: 5001 (5001), Dst Port: 49758 (49758), Seq: 0, Ack: 1, Len: 0 Source Port: 5001 (5001) Destination Port: 49758 (49758) [Stream index: 73] [TCP Segment Len: 0] Sequence number: 0 (relative sequence number) Acknowledgment number: 1 (relative ack number) Header Length: 32 bytes .... 0000 0101 0010 = Flags: 0x052 (SYN, ACK, ECN) Window size value: 64512 [Calculated window size: 64512] Checksum: 0xb5bb [validation disabled] Urgent pointer: 0 Options: (12 bytes), Maximum segment size, No-Operation (NOP), Window scale, No-Operation (NOP), No-Operation (NOP), SACK permitted Maximum segment size: 1460 bytes No-Operation (NOP) Window scale: 0 (multiply by 1) Kind: Window Scale (3) Length: 3 Shift count: 0 [Multiplier: 1] No-Operation (NOP) No-Operation (NOP) TCP SACK Permitted Option: True [SEQ/ACK analysis]
序列图的接收者视angular
TCP窗口
我已经看到这是一个司机特定的问题; 在我的情况下,QLogicnetworking控制器试图使用TCPChimney。 这个链接描述了在Windows 2008中添加的TCPChimneyfunction,但我确定它仍然适用: https : //support.microsoft.com/en-us/kb/951037
我会build议按顺序testing以下内容: 在每次testing之后,重新启动并查看接收器是否按预期开始增加TCP RWIN。
1)在接收计算机上加载最新版本的networking适配器驱动程序。 1)在接收计算机上禁用TCPChimney 2)禁用所有“TCP接收”卸载。 这可以在networking适配器属性的高级设置(速度和双工将被设置的相同区域)中find。3)禁用所有'TCP发送'卸载(也在networking适配器的高级属性中)
(而且相反的评论“大的65k以上的TCP窗口大小对于服务器来说是不利的,因为这样连接的内存需求就会增加,单靠65k也可能不会让你满意。” – – user303507 Aug 6 '15 at 11:30“大的TCP接收窗口对于服务器来说本质上是不利的,对于高带宽,高延迟的链路(如卫星中继),需要大的RWIN值,这样我们就有了更多的TCP数据“想象一下” 600 Mbps连接,延迟时间为3000毫秒;高带宽链接将被限制在20 KBps左右,因为一次只能有65 KB的未获取的TCP数据在pipe道中)。
看起来像一个Windows autotuning错误对我来说,也许这样做呢? https://support.microsoft.com/en-us/kb/932170
您是否尝试过使用WskControlSocket手动请求更大的SO_RCVBUF值?
使用思科WAAS或Riverbed等networking优化器。 他们快速地执行本地安装,所以您不需要关心服务器设置。 在更大的networking中,您无论如何都不会影响服务器设置,因为这些是其他团队,或者这是外包的。
这里是我发现的一些信息 ,可能是你正在寻找的答案。 请注意,在禁用模式下提及64kb的限制可能是正常模式下类似限制的一个线索,没有logging。
尝试启用“实验”模式进行天文自动调谐。
设置Windows Auto-Tuning级别时,可能的设置如下所示:
- 正常:默认值,允许接收窗口增长以适应大多数情况
- 禁用:为tcp接收窗口使用固定值。 限制为64KB(限制在65535)。
- 高度限制:允许接收窗口非常保守地增长超出默认值
- 受限制的:tcp接收窗口的增长超出其默认值
- 实验:允许接收窗口增长以适应极端情况(不推荐,它可以降低常见场景中的性能,仅用于研究目的,使RWIN值超过16 MB)