HPC场景智能无损网络典型配置案例
组网需求
如图4-6所示,为某HPC业务的智能无损网络应用组网,服务器均采用CPU进行并行计算。服务器网卡均支持RoCEv2协议并开启DCQCN功能。Leaf和Spine之间采用100GE链路全互联,服务器使用100GE链路接入Leaf交换机,收敛比为1:1。本示例中Leaf和Spine交换机均使用CE8850-64CQ-EI。
优先级规划
结合业务流量特征,本次示例中对优先级的规划为:
- CNP报文单独用优先级6进行承载并配置为PQ调度模式,DSCP值为25;
- RoCEv2流量采用优先级4进行承载并配置为DRR调度模式,权重65%,DSCP值为24。
- 运维流量固定采用优先级0承载,本案例中配置为DRR调度模式,权重5%。
- 其他优先级暂时预留。
配置思路
本举例默认组网中Spine-Leaf-Server之间的互联IP及路由配置已完成,Server之间路由可达。
- 配置Leaf和Spine交换机。
- 配置PFC优先级流量控制,需要先配置各业务的优先级映射和拥塞调度。
- 配置低时延网络功能,配置成功后,设备默认开启无损队列的缓存空间自动优化功能和动态ECN门限功能,可以对这两个功能进行优化。
- 使能AI ECN功能,需要先去使能动态ECN功能。
- 配置PFC死锁检测。
- 配置服务器网卡(操作步骤略)。
- 配置网卡工作在RoCEv2模式。
- 配置RoCEv2的建链方式。
- 配置网卡信任DSCP模式,配置RoCEv2报文的DSCP值。
- 在网卡上为RoCEv2的优先级使能PFC。
- 在网卡上为RoCEv2的优先级使能DCQCN。
操作步骤
配置Leaf1,Leaf2、Spine1和Spine2上的配置与Leaf1上的配置类似,配置过程略
- 配置PFC优先级流量控制
- 配置优先级映射和拥塞调度# 根据规划,本次示例中设置RoCEv2的DSCP值为24,CNP报文的DSCP值为25,则配置设备中的Diffserv Domain优先级映射模板如下,将RoCEv2的优先级映射为优先级4(走队列4),CNP报文的优先级映射为优先级6(走队列6)。
<HUAWEI> system-view [~HUAWEI] sysname Leaf1 [*HUAWEI] commit [~Leaf1] diffserv domain ds1 [*Leaf1-dsdomain-ds1] ip-dscp-inbound 24 phb af4 green //将RoCEv2的优先级映射为优先级4 [*Leaf1-dsdomain-ds1] ip-dscp-inbound 25 phb cs6 green //将CNP报文的优先级映射为优先级6 [*Leaf1-dsdomain-ds1] quit [*Leaf1] port-group all_using //配置端口组 [*Leaf1-port-group-all_using] group-member 100ge 1/0/1 to 100ge 1/0/32 [*Leaf1-port-group-all_using] quit [*Leaf1] commit [~Leaf1] port-group all_using [*Leaf1-port-group-all_using] trust dscp [*Leaf1-port-group-all_using] trust upstream ds1 [*Leaf1-port-group-all_using] quit [*Leaf1] commit
# 根据规划,配置各个队列的拥塞调度模式。另外接口下队列的调度模式缺省为PQ调度模式,队列6采用缺省配置即可保障CNP报文的优先调度。
[~Leaf1] port-group all_using [*Leaf1-port-group-all_using] qos drr 0 4 [*Leaf1-port-group-all_using] qos queue 0 drr weight 5 [*Leaf1-port-group-all_using] qos queue 4 drr weight 65 [*Leaf1-port-group-all_using] quit [*Leaf1] commit
- 为承载RoCEv2流量的优先级配置PFC功能
#步骤1中规划使用优先级4来承载网络中的RoCEv2流量,则需要在各个接口下针对优先级4使能PFC,并使能PFC功能基于DSCP映射后的优先级进行反压。
[~Leaf1] dcb pfc //进入default PFC模板 [~Leaf1-dcb-pfc-default] priority 4 [*Leaf1-dcb-pfc-default] quit [*Leaf1] port-group all_using [*Leaf1-port-all_using] dcb pfc enable mode manual [*Leaf1-port-all_using] quit [*Leaf1] dcb pfc dscp-mapping enable slot 1 [*Leaf1] commit
上述配置完成后,承载网络中的RoCEv2流量的优先级为4的队列即为无损队列。
根据无丢包下优化无损业务性能中的内容,Leaf交换机和Spine交换机使用的都是CE8850-64CQ-EI,Leaf使用的端口数为32,Spine使用的端口数为16。可以将PFC反压帧触发门限的dynamic阈值分别调整为4和5,提升RoCEv2业务的性能。
# 配置Leaf1,Leaf2与Leaf1上配置一致。
<Leaf1> system-view [~Leaf1] port-group all_using [*Leaf1-port-group-all_using] dcb pfc buffer 4 xoff dynamic 4 [*Leaf1-port-group-all_using] quit [*Leaf1] commit
# 配置Spine1,Spine2与Spine1上配置一致。
<Spine1> system-view [~Spine1] port-group all_using [*Spine1-port-group-all_using] dcb pfc buffer 4 xoff dynamic 5 [*Spine1-port-group-all_using] quit [*Spine1] commit
- 配置优先级映射和拥塞调度
- 配置PFC死锁检测
# 配置无损队列的PFC死锁检测周期和恢复周期为100毫秒,并配置设备20s内出现5次PFC死锁时,去使能PFC功能。
[~Leaf1] dcb pfc [*Leaf1-dcb-pfc-default] dcb pfc deadlock-detect interval 10 [*Leaf1-dcb-pfc-default] priority 4 deadlock-detect time 10 [*Leaf1-dcb-pfc-default] priority 4 deadlock-recovery time 10 [*Leaf1-dcb-pfc-default] priority 4 turn-off threshold 5 [*Leaf1-dcb-pfc-default] quit [*Leaf1] commit
配置完成后,若需要修改PFC死锁检测的配置,为了保障配置成功,防止设备处于死锁恢复期间,需要执行shutdown命令,关闭应用了PFC功能的端口。
- 配置低时延网络功能
- 在Leaf1上配置低时延网络功能,该功能重启生效,配置成功后,设备默认开启无损队列的缓存空间自动优化功能和动态ECN门限功能。
[~Leaf1] low-latency fabric [*Leaf1-low-latency-fabric] quit [*Leaf1] commit [~Leaf1] quit <Leaf1> save Warning: The current configuration will be written to the device. Continue? [Y/N]: y <Leaf1> reboot Warning: The system will reboot. Continue? [Y/N]: y
- 在Leaf1上配置低时延网络功能,该功能重启生效,配置成功后,设备默认开启无损队列的缓存空间自动优化功能和动态ECN门限功能。
- 使能AI ECN功能。需要先去使能无损队列的动态ECN功能。
[~Leaf1] low-latency fabric [~Leaf1-low-latency-fabric] undo qos dynamic-ecn-threshold enable [*Leaf1-low-latency-fabric] quit [*Leaf1] commit [~Leaf1] ai-service [*Leaf1-ai-service] ai-ecn [*Leaf1-ai-service-ai-ecn] ai-ecn enable [*Leaf1-ai-service-ai-ecn] quit [*Leaf1-ai-service] quit [*Leaf1] commit
检查配置结果
- 查看PFC门限值和Headroom值。
[~Leaf1] display dcb pfc buffer interface 100ge1/0/1 Xon: PFC backpressure stop threshold Xoff: PFC backpressure threshold Hdrm: Headroom buffer threshold Guaranteed: PFC guaranteed buffer threshold The actual PFC backpressure stop threshold is the higher value between the value of xon and the difference between the value of xoff and the value of xon-offset. C:cells B:bytes K:kilobytes M:megabytes D:dynamic alpha ------------------------------------------------------------------------------------ Interface Queue Guaranteed Xon Xon-Offset Xoff Hdrm ------------------------------------------------------------------------------------ 100GE1/0/1 4 10(C) 100(C) 20(C) 4(D) 250(C) ------------------------------------------------------------------------------------
- 查看PFC死锁触发和恢复的次数,DeadlockNum和RecoveryNum为0表示未触发死锁。
[~Leaf1] display dcb pfc interface 100ge 1/0/1 ----------------------------------------------------------------------------------------- Interface Queue Received(Frames) ReceivedRate(pps) DeadlockNum Transmitted(Frames) TransmittedRate(pps) RecoveryNum ----------------------------------------------------------------------------------------- 100GE1/0/1 4 0 0 0 0 0 0 -----------------------------------------------------------------------------------------
- 查看AI ECN功能的使能状态和计算出的ECN门限值。
[~Leaf1] display ai-ecn calculated state interface 100ge 1/0/1 *: Indicates the queue where AI ECN takes effect. AI-ECN State: enabled -------------------------------------------------------------------- Interface Queue Low-Threshold High-Threshold Probability (Byte) (Byte) (%) -------------------------------------------------------------------- 100GE1/0/1 0 0 0 0 1 0 0 0 2 0 0 0 3 0 0 0 *4 4896 18874080 40 5 0 0 0 6 0 0 0 7 0 0 0
效果验证
HPC高性能计算场景的时延是重要的性能指标,针对HPC高性能计算场景智能无损网络的效果验证,可以通过第三方工具测试或者通过iMaster NCE-FabricInsight可视化运维来实现,iMaster NCE-FabricInsight可视化运维的部署指导请参见智能无损网络可视化运维部署最佳实践。