Windows Server 2012 TCP 窗口不缩放

Windows Server 2012 TCP 窗口不缩放

我有 2 台 Windows 2012 服务器,它们将连接速度限制在 1-3mBps 之间,这似乎与 TCP 窗口缩放有关。两台服务器都有这些设置

 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    : disabled

iperf 的结果是

PS C:\iperf-3.1.3-win64> .\iperf3.exe -c x.x.x.x --port 27015 --verbose
iperf 3.1.3
CYGWIN_NT-6.2 ks4000721 2.5.1(0.297/5/3) 2016-04-21 22:14 x86_64
Time: Mon, 27 Aug 2018 07:13:21 GMT
Connecting to host x.x.x.x, port 27015
      Cookie: ks4000721.1535354000.903985.669c51a3
      TCP MSS: 0 (default)
[  4] local y.y.y.y port 53412 connected to x.x.x.x port 27015
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  2.00 MBytes  16.8 Mbits/sec
[  4]   1.00-2.00   sec  3.38 MBytes  28.3 Mbits/sec
[  4]   2.00-3.00   sec  3.50 MBytes  29.4 Mbits/sec
[  4]   3.00-4.00   sec  3.50 MBytes  29.4 Mbits/sec
[  4]   4.00-5.00   sec  3.38 MBytes  28.3 Mbits/sec
[  4]   5.00-6.00   sec  3.50 MBytes  29.4 Mbits/sec
[  4]   6.00-7.00   sec  3.38 MBytes  28.3 Mbits/sec
[  4]   7.00-8.00   sec  3.50 MBytes  29.4 Mbits/sec
[  4]   8.00-9.00   sec  2.88 MBytes  24.1 Mbits/sec
[  4]   9.00-10.00  sec  2.12 MBytes  17.8 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  31.1 MBytes  26.1 Mbits/sec                  sender
[  4]   0.00-10.00  sec  31.1 MBytes  26.1 Mbits/sec                  receiver
CPU Utilization: local/sender 1.5% (0.6%u/0.9%s), remote/receiver 0.3% (0.2%u/0.2%s)

iperf Done.

如果我在 iperf 中手动设置窗口,我可以使服务器的端口速度最大化。

PS C:\iperf-3.1.3-win64> .\iperf3.exe -c x.x.x.x --port 27015 --verbose --window 1
6000000
iperf 3.1.3
CYGWIN_NT-6.2 ks4000721 2.5.1(0.297/5/3) 2016-04-21 22:14 x86_64
Time: Mon, 27 Aug 2018 07:18:56 GMT
Connecting to host 70.189.80.34, port 27015
      Cookie: ks4000721.1535354336.472314.35587933
      TCP MSS: 0 (default)
[  4] local y.y.y.y port 53585 connected to x.x.x.x port 27015
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  18.0 MBytes   151 Mbits/sec
[  4]   1.00-2.00   sec  11.1 MBytes  93.3 Mbits/sec
[  4]   2.00-3.00   sec  11.2 MBytes  94.4 Mbits/sec
[  4]   3.00-4.00   sec  7.62 MBytes  64.0 Mbits/sec
[  4]   4.00-5.00   sec  14.5 MBytes   122 Mbits/sec
[  4]   5.00-6.00   sec  11.0 MBytes  92.2 Mbits/sec
[  4]   6.00-7.00   sec  10.8 MBytes  90.2 Mbits/sec
[  4]   7.00-8.00   sec  11.0 MBytes  92.3 Mbits/sec
[  4]   8.00-9.00   sec  11.2 MBytes  94.4 Mbits/sec
[  4]   9.00-10.00  sec  11.0 MBytes  92.2 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   118 MBytes  98.6 Mbits/sec                  sender
[  4]   0.00-10.00  sec   104 MBytes  86.9 Mbits/sec                  receiver
CPU Utilization: local/sender 1.1% (0.6%u/0.4%s), remote/receiver 0.4% (0.2%u/0.3%s)

iperf Done.

我的另一台服务器 2012 r2 也存在类似的问题,通过手动指定窗口大小可以最大限度地利用我家用电脑的带宽。

PS C:\iperf> .\iperf3.exe -c x.x.x.x --port 27015 --verbose
iperf 3.1.3
CYGWIN_NT-6.3 S 2.5.1(0.297/5/3) 2016-04-21 22:14 x86_64
Time: Mon, 27 Aug 2018 07:23:02 GMT
Connecting to host x.x.x.x, port 27015
      Cookie: 
      TCP MSS: 0 (default)
[  4] local x.x.x.x port 51271 connected to x.x.x.x port 27015
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  2.25 MBytes  18.9 Mbits/sec
[  4]   1.00-2.00   sec  3.50 MBytes  29.3 Mbits/sec
[  4]   2.00-3.00   sec  3.50 MBytes  29.4 Mbits/sec
[  4]   3.00-4.00   sec  3.50 MBytes  29.4 Mbits/sec
[  4]   4.00-5.00   sec  3.38 MBytes  28.3 Mbits/sec
[  4]   5.00-6.00   sec  3.50 MBytes  29.4 Mbits/sec
[  4]   6.00-7.00   sec  3.50 MBytes  29.4 Mbits/sec
[  4]   7.00-8.00   sec  3.50 MBytes  29.4 Mbits/sec
[  4]   8.00-9.00   sec  3.50 MBytes  29.3 Mbits/sec
[  4]   9.00-10.00  sec  3.50 MBytes  29.4 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  33.6 MBytes  28.2 Mbits/sec                  sender
[  4]   0.00-10.00  sec  33.6 MBytes  28.2 Mbits/sec                  receiver
CPU Utilization: local/sender 0.9% (0.3%u/0.6%s), remote/receiver 0.1% (0.0%u/0.0%s)

iperf Done.


    PS C:\iperf> .\iperf3.exe -c x.x.x.x --port 27015 --verbose --window 409600000
iperf 3.1.3
CYGWIN_NT-6.3 S 2.5.1(0.297/5/3) 2016-04-21 22:14 x86_64
Time: Mon, 27 Aug 2018 07:23:30 GMT
Connecting to host x.x.x.x, port 27015
      Cookie: 
      TCP MSS: 0 (default)
[  4] local x.x.x.x port 51276 connected to x.x.x.x port 27015
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec   392 MBytes  3.28 Gbits/sec
[  4]   1.00-2.00   sec  8.25 MBytes  69.3 Mbits/sec
[  4]   2.00-3.00   sec  23.2 MBytes   195 Mbits/sec
[  4]   3.00-4.00   sec  45.8 MBytes   384 Mbits/sec
[  4]   4.00-5.00   sec  35.9 MBytes   301 Mbits/sec
[  4]   5.00-6.00   sec  35.6 MBytes   299 Mbits/sec
[  4]   6.00-7.00   sec  35.2 MBytes   296 Mbits/sec
[  4]   7.00-8.00   sec  34.9 MBytes   292 Mbits/sec
[  4]   8.00-9.00   sec  34.9 MBytes   292 Mbits/sec
[  4]   9.00-10.00  sec  34.8 MBytes   291 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   681 MBytes   571 Mbits/sec                  sender
[  4]   0.00-10.00  sec   292 MBytes   245 Mbits/sec                  receiver
CPU Utilization: local/sender 2.6% (0.6%u/2.0%s), remote/receiver 8.3% (2.9%u/5.4%s)

iperf Done.

我尝试了各种调整和工具来解决这个问题,但都无济于事。唯一的解决方法是使用下载管理器,如果我想超出 TCP 窗口限制,它会一次请求多个部分。

手动设置接收/发送窗口可使速度略快一些,但根据 wireshark,窗口只能扩展到 200kb http://ss13.moe/uploads/2018-08-30_15-13-50.txt

相关内容