avatar

目录
TCP公平性AIMD

TCP公平性AIMD

🧑‍💻 User

Close


Recall that we defined fairness as one of the desirable goals of congestion control. In this case, fairness means that for k connections passing through one common link with capacity R bps, each connection gets an average throughput of R/k.

So, is TCP fair?

Consider a simple scenario where two TCP connections share a single link with bandwidth R. For simplicity, assume that both connections have the same RTT and only TCP segments pass through the link. Suppose we plot a graph for the throughput of these two connections. In that case, the throughput for each should sum up to R. The goal is to get the throughput achieved for each link to fall somewhere near the intersection of the equal bandwidth share line and the full bandwidth utilization line, as shown in the graph below:

Throughput realized by TCP connections 1 and 2

At point A in the above graph, the total utilized bandwidth is less than capacity R, so no loss can occur at this point. Therefore, both the connection will increase their window size. Thus, the utilized bandwidth’s sum will grow, and the graph will move towards B.

At point B, as the total transmission rate is more than capacity R, both connections may start having packet loss. As a result, they will decrease their window size to half and move towards point C.

At point C, the total throughput is again less than R, so both connections will increase their window size to move towards point D and will experience packet loss at D, and so on.

Thus, using AIMD leads to fairness in bandwidth sharing.

—-\


🤖 Assistant

费曼学习法自检清单:TCP公平性与AIMD


📋 Checklist 自检清单

第一层:核心概念理解

  • [ ] 我能用自己的话解释什么是拥塞控制中的”公平性”(Fairness)吗?
  • [ ] 我能说出公平性的数学定义吗?(k个连接共享R带宽时,每个连接应获得多少?)

第二层:场景设定理解

  • [ ] 我能描述这个简化模型的假设条件吗?(几个连接?什么相同?)
  • [ ] 我能解释图中两条关键线的含义吗?
    • [ ] 等带宽共享线 (Equal Bandwidth Share Line)
    • [ ] 完全带宽利用线 (Full Bandwidth Utilization Line)

第三层:AIMD过程追踪

  • [ ] 我能解释点A发生了什么?为什么会移动到B?
  • [ ] 我能解释点B发生了什么?为什么会移动到C?
  • [ ] 我能解释点C发生了什么?为什么会移动到D?
  • [ ] 我能说出这个循环的规律吗?

第四层:机制原理

  • [ ] 我能解释AIMD中的”AI”(Additive Increase/加性增加)在图中如何体现?
  • [ ] 我能解释AIMD中的”MD”(Multiplicative Decrease/乘性减少)在图中如何体现?
  • [ ] 我能解释为什么这种锯齿形路径最终会趋向公平点?

第五层:能否教给别人

  • [ ] 我能不看材料,画出这个图并解释整个过程吗?
  • [ ] 我能用一个生活中的比喻来解释AIMD如何实现公平吗?

✅ 参考答案

问题1:什么是拥塞控制中的”公平性”(Fairness)?

答案:公平性指的是当k个TCP连接(connections)共享一条容量为R bps的链路(link)时,每个连接应该获得平均 R/k 的吞吐量(throughput)。


问题2:简化模型的假设条件是什么?

答案

  • 两个TCP连接共享一条带宽为R的链路
  • 两个连接具有相同的RTT (Round-Trip Time/往返时间)
  • 链路上只传输TCP段(segments)

问题3:图中两条关键线的含义?

答案

  • 等带宽共享线 (Equal Bandwidth Share Line):连接1和连接2获得相同吞吐量的点的集合(45度对角线)
  • 完全带宽利用线 (Full Bandwidth Utilization Line):两个连接吞吐量之和等于R的点的集合

问题4:AIMD过程中A→B→C→D的变化?

状态 原因 动作 移动方向
A 总带宽 < R 无丢包(no loss) 两连接都增加窗口(increase window size) → B
B 总带宽 > R 发生丢包(packet loss) 两连接都将窗口减半(decrease to half) → C
C 总带宽 < R 无丢包 两连接都增加窗口 → D
D 总带宽 > R 发生丢包 两连接都将窗口减半 继续循环…

问题5:为什么AIMD能实现公平?

答案

  • 加性增加(AI):两个连接以相同的速率增加,在图上表现为沿45度方向移动
  • 乘性减少(MD):两个连接都减半,在图上表现为向原点方向移动
  • 这种组合使得轨迹呈锯齿形(zigzag),逐渐收敛到等带宽共享线与完全带宽利用线的交点,即公平且高效的状态

🎯 一句话总结

TCP通过AIMD机制实现公平性:无丢包时同步加,有丢包时同步减半,最终收敛到公平分配点。


评论