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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM