浅谈RDMA流控设计

队列

pfc

概述

Priority Flow Control (PFC) IEEE 802.1Qbb applies pause functionality to specific classes of traffic on the Ethernet link. It provides an enhancement to the existing pause flow control mechanism as described in 802.1x.

When the receive buffer on a switch interface fills to a threshold, the switch transmits a pause frame to the sender (the connected peer) to temporarily stop the sender from transmitting more frames. The buffer threshold must be low enough so that the sender has time to stop transmitting frames and the receiver can accept the frames already on the wire before the buffer overflows.

PFC prevents buffer overflow by pausing the upstream sending entity when buffer occupancy exceeds a specified threshold.

pfc发生场景

  1. RoCE的流量需要保证运行在无损队列中,无损队列是指使用了PFC技术,能针对某一队列发送pause帧,迫使上游停流。
  2. 接收方在网卡缓存达到某个水位阈值,会向上游反压pfc帧(tx pfx),让上游停流。
  3. pfc帧上游首先到汇聚路由器,由于路由器自身有缓存,所以接收方反压的PFC不会立刻向发送方反压,而是将发送方的流量存储在自身的缓存里。等pfc pause时间过了之后再向接收方发送。
  4. 如果汇聚路由器的缓存也被打爆,则会向发送方反压pfc(rx pfc)
什么场景容易触发pfc?
  1. 接收方网卡承受了超过极限的流量压力,导致网卡buffer被打爆
  2. 接收方网卡buffer通过dma将数据转移到内存的速度较慢,导致网卡buffer一直维持在一个很高的水位
    • 比如100G网卡,插在Gen3X16插槽上,总共可用带宽只有125G,但是200G的rdma网卡产生很多PCIe Internal Back Pressure事件,导致网卡buffer降的比较慢。
  3. 多打一ibv_srq_pingpong测试
    • 写请求占用了一部分rdma网卡资源,导致网卡处理读请求的速度变慢

DCQCN

网络拥塞控制是一个很复杂的课题,这里只讲一些基本的设计思路
RoCE使用的拥塞控制算法是DCQCN,*《Congestion Control for Large-Scale RDMA Deployments》*这篇论文很详细地描述了该算法。

这里先简单的描述下这个算法:维护这个算法的节点是服务器,也就是流量的两端,中间的交换机作为传输节点,通告是否拥塞。发送方叫Reaction Point,简称RP;接收方叫Notification Point,简称NP;中间交换机叫 Congestion Point,简称CP。发送方(RP)以最高速开始发送,沿途过程中如果有拥塞,会被标记ECN显示拥塞,当这个被标记的报文转发到接收方(NP)的时候,接收方(NP)会回应一个CNP报文,通知发送方(RP)。收到CNP报文的发送方(RP),就会开始降速。当发送方没有收到CNP报文时,就开始又提速了。

参考链接

  1. Priority Flow Control (PFC)
  2. Understanding CoS Flow Control (Ethernet PAUSE and PFC)
  3. 802.1Qbb – Priority-based Flow Control
  4. Revisiting Network Support for RDMA - Extended version of the SIGCOMM 2018 paper论文挺好的,很多基本概念也有,比如NACK: negative acknowledgement
  5. RDMA over Commodity Ethernet at Scale SIGCOMM 2016 paperguochuanxiong的论文,谈到了pfc的产生原因和应对方法
  6. Congestion Control for Large-Scale RDMA deployments 2015 sigcomm,首篇提到DCQCN的论文
  7. UCloud高性能RoCE网络设计
  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值