mirror of
https://github.com/skywind3000/kcp.git
synced 2025-03-23 16:00:08 +08:00
Updated EN_KCP Feature (markdown)
parent
5551b668aa
commit
d4bfce1c05
@ -1,12 +1,12 @@
|
||||
# 技术特性
|
||||
# Key Algorithm
|
||||
|
||||
TCP是为流量设计的(每秒内可以传输多少KB的数据),讲究的是充分利用带宽。而 KCP是为流速设计的(单个数据包从一端发送到一端需要多少时间),以10%-20%带宽浪费的代价换取了比 TCP快30%-40%的传输速度。TCP信道是一条流速很慢,但每秒流量很大的大运河,而KCP是水流湍急的小激流。KCP有正常模式和快速模式两种,通过以下策略达到提高流速的结果:
|
||||
TCP is design to transmit as most data as possible over internet, but maybe not care about the efficient, latency, how fast, or how fast. While, KCP is designed for efficient modern internet, to delivery packet as fast as possible over internet. KCP transmit faster than TCP(30%-40%), use FEC/ARQ which cost 10%-20% bandwidth. KCP support normal and fast mode, use different strategy to improve the transport efficiency and speed:
|
||||
|
||||
#### RTO翻倍vs不翻倍:
|
||||
#### Double RTO or Not
|
||||
|
||||
TCP超时计算是RTOx2,这样连续丢三次包就变成RTOx8了,十分恐怖,而KCP启动快速模式后不x2,只是x1.5(实验证明1.5这个值相对比较好),提高了传输速度。
|
||||
The algorithm for TCP to calculate timeout is RTOx2, which will become very bad when network is bad, for example, the RTO will change to RTOx8 for just drop 3 packets. KCP use different algorithm, use RTOx1.5(not RTOx2), it works very good in scenario of internet.
|
||||
|
||||
#### 选择性重传 vs 全部重传:
|
||||
#### Retransmit All or Partial
|
||||
|
||||
TCP丢包时会全部重传从丢的那个包开始以后的数据,KCP是选择性重传,只重传真正丢失的数据包。
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user