TCP加速方式

使用windows scaling

TCP Extensions for High Performance, RFC1323,https://www.ietf.org/rfc/rfc1323.txt

这里说win7上默认是打开的,如何设置呢

https://www.sourcedaddy.com/windows-7/tcp-receive-window-scaling.html

The ability to increase the receive window would be meaningless without window scaling. On its own, TCP allows a window size of only 64 KB. Operating systems back through Windows XP use this as their default value on fast links. The window scaling option is a way for window sizes to scale to megabytes and beyond. Starting with Windows Vista, window scaling is used by default.

During connection establishment, use of the window scaling option is negotiated with the remote host. If supported by the remote side, window scaling is enabled on the connection. Windows Vista and Windows 7 use a scale factor of 8, which means that the advertised receive window value should be multiplied by 256. Therefore, Receive Window Auto-Tuning uses a maximum receive window size of 16 MB.

 win10设置为experimental,即14,2**14=16384,默认是nomal,即8,,2**8=256,256*64K=16M

netsh int tcp set global autotuninglevel=experimental

一端下载ftp文件,实际发现最后使用的仍然是65536大小的窗口

196,SYN,win=65535,WS(window scaling)=16384

197,SYN ACK,win=65535,WS(window scaling)=16384

199,ACK,win=16,WS(window scaling)=16384,win=262144

208,发送数据,win=4,WS(window scaling)=16384,win=65536,这里为什么win会变为4呢?如果这个可以这么小,窗口放大就没有意义了。

发送数据包只能发送到217,此时seq=12961,然后,就停止发送了,为什么呢?即使win=65535,也没有到win的一半啊?

然后,等了800ms,等到了对方发过来的ACK,223,224,225。

然后,又继续发送。

 使用iperf,发现可以设置窗口大小,

-w, --window n[KM] Sets the socket buffer sizes to the specified value. For TCP, this sets the TCP window size. (this gets sent to the server and used on that side too)

设置完之后,发现iperf会设置win和WS两个参数,设置更大的窗口

设置窗口大小为8MB后,可以使吞吐量达到4.11Mbps。

  

FTP应用如何增大窗口呢

可以设置自动调参为experimental,但WS虽然设置为最大,但win仍然很小,最终窗口大小仍然不大,如何设置win也很大呢?

 

关闭wireshark对于tcp的相对序列号

如果想要关闭相对序列号/确认号,可以选择Wireshark菜单栏中的 Edit -> Preferences ->protocols ->TCP,去掉Relative sequence number后面勾选框中的√即可

https://blog.csdn.net/a19881029/article/details/38091243

 

TCP欺骗方式

两种方式:

1、对称方式,在两端都增加加速器。缺点:两端都需要,一般都是私有知识产权;优点:可以使用压缩、缓存等手段进一步提高性能。

2、非对称方式,只在一端,比如服务器端增加加速器。

 

COTS产品——国外:

1、海事卫星的BGAN TCP Accelerator,这个好像需要与海事的BGAN配合完成,不知能否单独使用,而且,是加速发送方向。

https://www.inmarsat.com/support/bgan-firmware/bgan-tcp-accelerator/

2、WANOS,软件和硬件单卖,采用对称方式

http://wanos.co/wan-optimization/tcp-acceleration-pep/

COTS产品——国内:

1、北京蓝卫通科技有限公司

 

 

http://intronetworks.cs.luc.edu/current/html/newtcps.html#highspeed-tcp

https://www.sourcedaddy.com/windows-7/tcp-receive-window-scaling.html

posted on 2019-11-30 11:37  yanhc  阅读(1450)  评论(0编辑  收藏  举报

导航