rdma-perftest
rdma-perftest 测试昇腾环境的带宽和时延
编译说明
依赖安装
源码放到环境上后,转换一下格式:
dos2unix *
编译依赖 verbs,需要提前在环境上安装 verbs
yum install -y libibverbs rdma-core
yum install -y libibverbs-devel rdma-core-devel
yum install libibverbs-utils
# 编译相关内容生成:
yum install -y libtool
基础编译(无CANN支持)
如果不需要CANN支持,可以仅编译基础功能:
bash autogen.sh
./configure
make
启用CANN支持的编译
如果要在有CANN环境的系统上启用CANN支持,按如下步骤操作:
# 导入cann环境变量
source /usr/local/Ascend/ascend-toolkit/set_env.sh
source /usr/local/Ascend/cann-9.0.0/set_env.sh
# 配置和编译项目(支持NDA功能)
bash autogen.sh
./configure --enable-cann --with-cann=$ASCEND_TOOLKIT_HOME --with-cust-opapi=/usr/local/Ascend/cann-9.0.0/opp/vendors/customize
make
测试指令示例
Write 带宽测试:
# Server
ib_write_bw -d xscale_0 -i 0 --report_gbits -F -a --use_cann=2 --post_list=128 -n 12800 --run_infinitely
# Client
ib_write_bw -d xscale_1 -i 0 --report_gbits -F -a --use_cann=2 --post_list=128 -n 12800 --run_infinitely 192.168.100.100
Read 带宽测试:
# Server
ib_read_bw -d xscale_0 -i 0 --report_gbits -F -a --use_cann=2 --post_list=128 -n 12800 --run_infinitely
# Client
ib_read_bw -d xscale_1 -i 0 --report_gbits -F -a --use_cann=2 --post_list=128 -n 12800 --run_infinitely 192.168.100.100
Read 时延测试:
# Server
ib_read_lat -d xscale_0 -i 0 --report_gbits -F -a --use_cann=2 --post_list=128 -n 12800 --run_infinitely
# Client
ib_read_lat -d xscale_1 -i 0 --report_gbits -F -a --use_cann=2 --post_list=128 -n 12800 --run_infinitely 192.168.100.100
Send 时延测试:
# Server
ib_send_lat -d xscale_0 -i 0 --report_gbits -F -a --use_cann=2 --post_list=128 -n 12800 --run_infinitely
# Client
ib_send_lat -d xscale_1 -i 0 --report_gbits -F -a --use_cann=2 --post_list=128 -n 12800 --run_infinitely 192.168.100.100