不一致的延迟会对 TCP 应用程序产生什么影响?
我正在测试一个 GNU Radio 程序,它可以通过无线链路传输 TCP 流量。我们在测试中得到了一些奇怪的结果,在寻找罪魁祸首时,我对不一致的延迟感到好奇。
不一致的延迟如何影响 TCP 应用程序?我所说的不一致是指连接上 ACK 的 RTT 有很大不同。有一段时间,ACK 似乎以正常速率到来,然后它们消失了,我们进行了重传,然后是“延迟”的 ACK。
例如,假设收到的前几个 ACK 具有相似的 RTT。如果在两倍于前一个 ACK 的 RTT 时间内未收到下一个 ACK,会发生什么情况?无论问题是什么,在长时间等待 ACK 后,我都会看到大量的重传。
现在,更具体地说,在快慢之间跳动的 ACK 的 RTT 如何影响 TCP 连接?
话虽如此,有没有办法调整 IP 堆栈以更好地处理这种环境?
I am testing a GNU Radio program which can tunnel TCP traffic over a wireless link. We are having some strange results in testing, and in looking for a culprit I was curious about inconsistent latency.
How can inconsistent latency affect TCP applications? By inconsistent I mean widely different RTT for ACKs on a connection. For awhile ACks seem to be coming at a normal rate, then they disappear and we have retransmissions followed by the 'delayed' ACK.
For instance, say the first several ACK's received have a similar RTT. What would happen when the next ACK isn't receieved in twice the RTT of the previous ACKs? Whatever the issue is I see lots of retransmissions after a long wait for an ACK.
Now, more specifically, how can RTTs for ACKs which bounce between fast and slow affect a TCP connection?
Having said that, is there any way to tune the IP stack to handle this environment better?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
TCP 维护一个平滑的 RTT (SRTT) 来告诉它中间网络的速度有多快,即它可以传输多快。如果 SRTT 上升,TCP 将减慢速度。如果 SRTT 下降,TCP 将会加速。如果实际 RTT 剧烈上下波动,TCP 由于平滑的原因可能反应不够快,传输过快,导致丢包,进而引起重传,浪费带宽由丢失的数据包使用。 RTT 平滑是通过指数衰减完成的,增益为 0.2,因此在计算新 SRTT 值时,旧 SRTT 值的权重是当前 RTT 的四倍。
TCP maintains a smoothed RTT (SRTT) to tell it how fast the intervening network is, i.e. how fast it can transmit. If the SRTT goes up TCP will slow down. If SRTT goes down TCP will speed up. If the actual RTT goes up and down violently, TCP may not react quickly enough, due to the smoothing, and transmit too fast, which would cause packet loss, which in turn causes retransmission, which wastes the bandwidth used by the lost packets. RTT smoothing is done via exponential decay with a gain of I think 0.2, so the old SRTT value has four times the weight of the current RTT when computing the new SRTT value.