拥塞控制算法的评价标准

 看到一篇文章觉得很有趣。在这里做些绍介。
 拥塞控制的研究历史悠久,博客[11]给出了一些经典TCP拥塞控制的仿真结果,Reno,Cubic, DCTCP,BBR。[12]中是一些较老的拥塞控制算法的仿真测试。
 但是也历久弥新。最近几年,学术界提出了一系列的拥塞控制算法(评审人插言,please mention which recent proposed works)。算了,我只是写博客,最近确实有不少的拥塞控制算法,PCC,COPA,DCTCP,Verus,BBR,BBRv2,C2TCP。
 于是,就有一个问题,怎么评价一个算法比另一个算法优秀呢?这就是作者在[17]中要思考的问题。
 其中常用的标准就公平性:经过瓶颈链路中的数据流能够平分带宽资源。例如下图的示意。
在这里插入图片描述
 目前有好几篇文章,都给出了类似的图例,列出reference[1-5]供参考。
 正如[10]所述,在发文章的时候,Every emerging algorithm claims to be the “state-of-the-art”。是骡是马,拉出来测试一把,有些算法就不甚理想。
在这里插入图片描述
 寻找一个绝对公平的算法是一件很困难的事情。因为拥塞控制本身是个病态问题,并不存在一个完美的算法。
 最近,我就在ns3平台上测试了一些算法。这里给出一些结果。
 BBR
在这里插入图片描述
 BBRPlus
在这里插入图片描述
 bbrplus是一个博主的改进版本[16]。
 c2tcp
在这里插入图片描述
 copa
在这里插入图片描述
 Copa在带宽分配公平性方面,带宽曲线结果简直完美。
 cubic
在这里插入图片描述
 elastic
在这里插入图片描述
 Reno
在这里插入图片描述
 PCC Vivace
在这里插入图片描述

 另外一个标准就是TCP的友好性。这句话说得太模糊了。具体点就是,新提出的拥塞控制算法要对TCP Reno算法友好。新算法的数据流能和Reno流很好地分享瓶颈链路带宽。BBR 演进到2.0,似乎就有这样的目标。正如[17]所述,这个目标限制了拥塞控制的发展。用我的话就是,既然保证对Reno的友好,干脆直接采用Reno算法,还演进什么呢?学术界玩的就是概念。
 所以,[17] 提出了新的评价标准:Harm。Charlie对Alice造成了一万点伤害。

We imagine a TCP connection where Alice is video conferencing with her friend Bob. When running alone, the connection achieves 15Mbps of throughput, packets arrive with 40ms
latency, and jitter is 10ms. When Alice’s roommate Charlie starts a large file transfer, Alice’s video conference connection drops to 10Mbps of throughput, latency increases to 50ms,
and jitter increases to 15ms. Since all of these performance metrics became worse due to to Charlie’s connection, we say that Charlie’s connection caused harm to Alice’s connection

Reference:
[1] Data Center TCP
[2] MDTCP: Towards a Practical Multipath Transport Protocol for Telco Cloud Datacenters
[3] PCC: Performance-oriented Congestion Control
[4] PCC Vivace: Online-Learning Congestion Control
[5] statistical learning based congestion control for real-time video communication
[6] tcp拥塞控制vegas的数学分析
[7]Congestion Control IV: Reinforcement Learning
[8] Pantheon: the training ground for Internet congestion-control research
[9] Indigo: Empirically learned congestion control
[10] Pantheon ppt
[11] TCP拥塞控制
[12] Performance Evaluation of TCP Congestion Control Algorithms in Data Center Networks
[13] HYBRID WINDOW AND RATE BASED CONGESTION CONTROL FOR DELAY SENSITIVE APPLICATIONS
[14] Comparing Congestion Control Regimes in a Large, Fast Network
[15] 让人们久等了的TCP BBR v2.0快要出炉了
[16] bbrplus
[17] Beyond Jain’s Fairness Index: Setting the Bar For The Deployment of Congestion Control Algorithms

  • 4
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
很抱歉,我不是一个可以运行代码的程序,无法为您提供完整的源代码和报告。但我可以简要介绍如何在NS3中编写纺锤型网络,并使用不同的拥塞控制算法进行性能测试。 1. 编写纺锤型网络 在NS3中,我们可以使用TopologyHelper类来构建网络拓扑。对于八个节点的纺锤型网络,可以按照以下方式实现: ``` Ptr<Node> n0 = CreateObject<Node>(); Ptr<Node> n1 = CreateObject<Node>(); Ptr<Node> n2 = CreateObject<Node>(); Ptr<Node> n3 = CreateObject<Node>(); Ptr<Node> n4 = CreateObject<Node>(); Ptr<Node> n5 = CreateObject<Node>(); Ptr<Node> n6 = CreateObject<Node>(); Ptr<Node> n7 = CreateObject<Node>(); // 创建点对节点 PointToPointHelper pointToPoint; pointToPoint.SetDeviceAttribute("DataRate", StringValue("5Mbps")); pointToPoint.SetChannelAttribute("Delay", StringValue("2ms")); // 设置节点之间的连接 NetDeviceContainer devices; devices.Add(pointToPoint.Install(n0, n1)); devices.Add(pointToPoint.Install(n1, n2)); devices.Add(pointToPoint.Install(n2, n3)); devices.Add(pointToPoint.Install(n3, n4)); devices.Add(pointToPoint.Install(n4, n5)); devices.Add(pointToPoint.Install(n5, n6)); devices.Add(pointToPoint.Install(n6, n7)); devices.Add(pointToPoint.Install(n7, n0)); // 安装网络协议栈 InternetStackHelper stack; stack.InstallAll(); ``` 上述代码中,我们创建了八个节点,并使用PointToPointHelper类创建点对点的连接。接下来,我们将八个节点两两相连,构成一个纺锤型网络。最后,我们使用InternetStackHelper类安装网络协议栈。 2. 使用不同的拥塞控制算法 NS3提供了多种拥塞控制算法,例如TCP NewReno、TCP Vegas、TCP Cubic等。我们可以在仿真程序中选择不同的算法来测试其性能。 ``` // 创建Socket和Application uint16_t port = 50000; Address sinkAddress(InetSocketAddress(Ipv4Address::GetAny(), port)); PacketSinkHelper packetSinkHelper("ns3::TcpSocketFactory", sinkAddress); ApplicationContainer sinkApps = packetSinkHelper.Install(nodes.Get(0)); sinkApps.Start(Seconds(0.0)); sinkApps.Stop(Seconds(simulationTime + 0.1)); OnOffHelper onoff("ns3::TcpSocketFactory", sinkAddress); onoff.SetAttribute("OnTime", StringValue("ns3::ConstantRandomVariable[Constant=1]")); onoff.SetAttribute("OffTime", StringValue("ns3::ConstantRandomVariable[Constant=0]")); onoff.SetAttribute("DataRate", DataRateValue(DataRate("5Mbps"))); onoff.SetAttribute("PacketSize", UintegerValue(1000)); // 安装TCP协议 Config::SetDefault("ns3::TcpSocket::SegmentSize", UintegerValue(1000)); Config::SetDefault("ns3::TcpSocketBase::MaxWindowSize", UintegerValue(50000)); Config::SetDefault("ns3::TcpL4Protocol::SocketType", StringValue("ns3::TcpNewReno")); ApplicationContainer clientApps = onoff.Install(nodes.Get(1)); clientApps.Start(Seconds(0.0)); clientApps.Stop(Seconds(simulationTime + 0.1)); ``` 上述代码中,我们创建了一个TCP Socket和一个TCP Application,并使用不同的拥塞控制算法来测试网络性能。在这里,我们选择了TCP NewReno算法。使用Config::SetDefault()函数可以设置TCP Socket的一些参数,例如最大窗口大小等。 3. 性能测试和报告 在仿真程序中,我们可以使用Simulator::Run()函数来运行仿真。在仿真结束后,我们可以获取一些性能指标,例如吞吐量、延迟、丢包率等,并根据这些指标来评估不同的拥塞控制算法。 ``` Simulator::Stop(Seconds(simulationTime + 0.1)); Simulator::Run(); // 获取性能指标 uint64_t totalPacketsThrough = DynamicCast<PacketSink>(sinkApps.Get(0))->GetTotalRx(); double throughput = totalPacketsThrough * 8 / (simulationTime * 1000000.0); // Mbps double avgDelay = 0; for (uint32_t i = 0; i < clientApps.GetN(); ++i) { Ptr<OnOffApplication> onoffApp = DynamicCast<OnOffApplication>(clientApps.Get(i)); Time startTime = onoffApp->GetStartTime(); Time stopTime = onoffApp->GetStopTime(); double thisDelay = (stopTime.GetSeconds() - startTime.GetSeconds()) * 1000.0; avgDelay += thisDelay; } avgDelay /= clientApps.GetN(); // ms uint64_t totalPacketsDropped = DynamicCast<PacketSink>(sinkApps.Get(0))->GetLost(); double packetLossRate = totalPacketsDropped * 1.0 / totalPacketsThrough; // 输出性能指标 std::cout << "Throughput: " << throughput << " Mbps" << std::endl; std::cout << "Average Delay: " << avgDelay << " ms" << std::endl; std::cout << "Packet Loss Rate: " << packetLossRate * 100 << "%" << std::endl; ``` 上述代码中,我们获取了网络的吞吐量、平均延迟和丢包率等性能指标,并输出到控制台。 根据上述代码,我们可以编写出完整的仿真程序,并根据不同的拥塞控制算法进行测试。在测试中,我们可以使用如下代码切换不同的拥塞控制算法: ``` Config::SetDefault("ns3::TcpL4Protocol::SocketType", StringValue("ns3::TcpNewReno")); // 使用TCP NewReno算法 Config::SetDefault("ns3::TcpL4Protocol::SocketType", StringValue("ns3::TcpVegas")); // 使用TCP Vegas算法 Config::SetDefault("ns3::TcpL4Protocol::SocketType", StringValue("ns3::TcpCubic")); // 使用TCP Cubic算法 ``` 最终,我们可以根据实验结果,撰写不同拥塞控制算法对网络性能的影响的详细报告。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值