perftest 是一个基于 Verbs 接口开发的开源 RDMA 性能测试工具,可以对支持 RDMA 技术的节点进行带宽和时延测试
安装
安装命令如下:
apt install perftest- 支持的命令
ib_send_lat latency test with send transactions
ib_send_bw bandwidth test with send transactions
ib_write_lat latency test with RDMA write transactions
ib_write_bw bandwidth test with RDMA write transactions
ib_read_lat latency test with RDMA read transactions
ib_read_bw bandwidth test with RDMA read transactions
ib_atomic_lat latency test with atomic transactions
ib_atomic_bw bandwidth test with atomic transactionsib_read_bw或ib_read_lat测试 RDMA 读处理确定带宽或等待时间ib_send_bw或ib_send_lat测试 RDMA 发送处理确定带宽或等待时间ib_write_bw或ib_write_bw_postlist测试 RDMA 写处理,确定一次显示一个 I/O 请求的带宽或显示一系列 I/O 请求的发布列表带宽ib_write_lat测试 RDMA 写处理确定等待时间ib_clock_test测试系统时钟准确性qperf测量插槽与 RDMA 性能- perfquery or saquery 查询 IB 端口计数器或 sIB 子网管理属性
- 测试工具的默认端口
18515?
测试连通性
# server
$ ibv_rc_pingpong -d mlx5_bond_0 -g 0
# client
ibv_rc_pingpong -d mlx5_bond_0 -g 0 <server ip>可能会出现如下错误:
Failed status transport retry counter exceeded (12) for wr_id 2修改 -g 的值,通过 show_gids 获取对应的 index
测试带宽
# server
ib_write_bw --report_gbits
# client -D 30:测试时长 30 秒
ib_write_bw --report_gbits 10.10.10.111 -D 30
# 方式二
ib_write_bw -d mlx5_1
ib_write_bw --report_gbits -d mlx5_1 127.0.0.1
# 方式三
ib_write_bw -d mlx5_1 -x $NCCL_IB_GID_INDEX
ib_write_bw -d mlx5_1 -x $NCCL_IB_GID_INDEX <MACHINE_A_HOST> --report_gbits# server
$ ib_send_bw -d mlx5_bond_0 -D 60 --report_gbits
# client
ib_send_bw <server ip> -d mlx5_bond_0 -D 60 --report_gbitsCM(Communication Management Protocol,通信管理协议)测试
# 服务端启动
ib_send_bw -F -d mlx5_0 -s 100 -n 5 -R
# 客户端启动
ib_send_bw -F -d mlx5_0 -s 100 -n 5 192.168.100.9 -RRC(Reliable Connection)测试
# server
ib_write_bw -F -d mlx5_0 -s 64 -p 1024 -n 100 -c RC
# client
ib_write_bw -F -d mlx5_0 -s 64 -p 1024 -n 100 -c RC 192.168.100.9UD(Unreliable Datagram)测试
# server
ib_send_bw -F -d mlx5_0 -s 64 -p 1024 -n 100 -c UD
# client
ib_send_bw -F -d mlx5_0 -n 100 -s 64 -p 1024 -c UD 192.168.100.9测试延时
# server
ib_send_lat -d mlx5_bond_0 -D 60 --report_gbits
# client
ib_send_lat <server ip> -d mlx5_bond_0 -D 60 --report_gbits