Use CloudMonitor, eadm, iproute2, and the diagnose tool to monitor eRDMA traffic, locate faults, and evaluate network performance.
Prerequisites
eRDMA is installed and deployed on the target ECS instance. See Enable eRDMA for an ECS instance.
Monitor eRDMA with CloudMonitor
CloudMonitor tracks eRDMA status and supports custom alerts. See Custom monitoring.
View the monitoring metrics supported by eRDMA
Log on to the CloudMonitor console.
In the metric list search box, enter eri to view the monitoring metrics for eRDMA.
The search results include the following 5 eRDMA monitoring metrics (metric type:
erdma, Dimensions:userId,instanceId, Statistics:Value, MinPeriods:60s; all metrics support alert configuration):eri_active_qp_num: Number of connections in the instance ERI dimension, unit: countrx_eri_bw_bps: Inbound bandwidth in the instance ERI dimension, unit: bit/srx_eri_pkt_pps: Inbound data packet PPS in the instance ERI dimension, unit: count/stx_eri_bw_bps: Outbound bandwidth in the instance ERI dimension, unit: bit/stx_eri_pkt_pps: Outbound data packet PPS in the instance ERI dimension, unit: count/s
Diagnose eRDMA with the eadm tool
eadm is a user-space tool deployed with the eRDMA driver. It provides real-time monitoring and diagnostics to help locate faults. Key features include:
Traffic monitoring and assisted diagnostics: Real-time traffic statistics for the entire device.
Query and set configurations: Configure the delay ACK feature and the CC algorithm.
The following are common eadm commands. For other commands, run eadm -h.
This tool is for diagnostics and debugging only. It may change in the future, and its availability is not guaranteed in all scenarios.
View help for the
eadmcommand.eadm -h[root@xxx ~]# eadm -h Usage: eadm OBJECT { COMMAND | help } where OBJECT := { dump stat info ver conf help }Monitor real-time traffic of an eRDMA device
Requires driver version
0.2.34or later.eadm stat -d <ibdev_name> -l<ibdev_name>: the eRDMA device name. Runibv_devinfoto find it. If only one eRDMA device exists, you can omit-d <ibdev_name>.[root@xxx xxx ~]# ibv_devinfo hca_id: erdma_0 transport: eRDMA (1) fw_ver: 0.2.0 node_guid: 0216:3eff:fe13:1914 sys_image_guid: 0216:3eff:fe13:1914 vendor_id: 0x1ded vendor_part_id: 4223 hw_ver: 0x0 phys_port_cnt: 1 port: 1 state: PORT_ACTIVE (4) max_mtu: 4096 (5) active_mtu: 4096 (5) sm_lid: 0 port_lid: 0 port_lmc: 0x00 link_layer: Ethernet [root@xxx xxx ~]# eadm stat -d erdma_0 -l Monitoring erdma_0... (press CTRL-C to stop) 14:07:57 rx: 218.46 MiB/s 1000313 p/s tx: 218.46 MiB/s 1000315 p/sGet eRDMA device statistics, such as CM and verbs message counts and traffic counts.
eadm stat -d <ibdev_name><ibdev_name>: the eRDMA device name. Runibv_devinfoto find it. If only one eRDMA device exists, you can omit-d <ibdev_name>.[root@ixxxxxxZ ~]# eadm stat -d erdma_0 return cnts:55 listen_create_cnt : 1 listen_ipv6_cnt : 0 listen_success_cnt : 1 listen_failed_cnt : 0 listen_destroy_cnt : 0 accept_total_cnt : 300 accept_success_cnt : 300 accept_failed_cnt : 0 reject_cnt : 0 reject_failed_cnt : 0 connect_total_cnt : 300 connect_success_cnt : 300 connect_failed_cnt : 0 connect_timeout_cnt : 0 connect_reset_cnt : 0 cmdq_submitted_cnt : 266 cmdq_comp_cnt : 266 cmdq_eq_notify_cnt : 263 cmdq_eq_event_cnt : 0Get the current eRDMA driver version.
eadm ver
Other commands such as info, dump, and conf have usage constraints. Do not run them unless necessary.
Monitor and diagnose eRDMA with iproute2
iproute2 is a Linux networking toolkit that provides utilities such as ip and ss for managing network interfaces, routing tables, and traffic control. Use its built-in rdma command to monitor and diagnose the RDMA subsystem.
Most Linux distributions, such as Alibaba Cloud Linux 3 and Ubuntu 20.04 or later, include iproute2 by default. See your operating system documentation for details.
Query eRDMA device status.
rdma link[root@xxx log]# rdma link link erdma_0/1 state ACTIVE physical_state LINK_UP netdev eth0Query eRDMA resource usage, such as the number of CQs, QPs, and MRs.
NoteIn RDMA network communication, Queue Pair (QP), Completion Queue (CQ), Memory Region (MR), and verbs Opcode are the core components. They play important roles in RDMA communication and ensure high efficiency and low latency of RDMA network communication.
rdma res[root@xxx log]# rdma res 1: erdma_0: pd 12 cq 2 qp 200 cm_id 201 mr 301 ctx 2Query eRDMA performance statistics, such as connection counts, connection status, and packet counts.
rdma -p stat[root@xxx log]# rdma -p stat link erdma_0/1 link erdma_0/1 listen_create_cnt 1 listen_ipv6_cnt 0 listen_success_cnt 1 listen_failed_cnt 0 listen_destroy_cnt 0 accept_total_cnt 500 accept_success_cnt 500 accept_failed_cnt 0 reject_cnt 0 reject_failed_cnt 0 connect_total_cnt 500 connect_success_cnt 500 connect_failed_cnt 0 connect_timeout_cnt 0 connect_reset_cnt 0 cmdq_submitted_cnt 6344 cmdq_comp_cnt 6344 cmdq_eq_notify_cnt 5453 cmdq_eq_event_cnt 0 cmdq_cq_armed_cnt 5454 erdma_aeq_event_cnt 0
Diagnose and evaluate eRDMA with the diagnose tool
The diagnose tool supports basic function checks, HPC environment checks, and latency checks for eRDMA.
Possible results of a diagnose check
PASS: The check passed.SKIP: The current system version does not support this check.FAIL: The check tool is not installed or the check failed. The failed command is listed infail info.Other INFO messages: eRDMA configuration details, such as installation mode, driver version, and CC algorithm.
Install diagnose
On an eRDMA-configured instance, download the diagnose tool:
Download from an internal URL
wget http://mirrors.cloud.aliyuncs.com/erdma/tools/diagnose.pyDownload from a public URL
wget https://mirrors.aliyun.com/erdma/tools/diagnose.py
Diagnose basic eRDMA functions
The basic functional test verifies driver installation, network connectivity, and the eRDMA kernel driver's installation mode.
Procedure:
Log on to the eRDMA-configured instance.
Download the diagnose tool.
Download from an internal URL
wget http://mirrors.cloud.aliyuncs.com/erdma/tools/diagnose.pyDownload from a public URL
wget https://mirrors.aliyun.com/erdma/tools/diagnose.py
Check the basic functions of eRDMA:
python diagnose.py -dThe following is an example output. For diagnostic item descriptions, see eRDMA basic function diagnostic items.
[root@jxxx ~]# python diagnose.py -d [INFO] Begin to run erdma basic diagnoses. It's better to ensure that erdma driver and related tools, e.g. eadm, ibv_devinfo, rdma, have been installed. [INFO] The diagnose results mean: [INFO] PASS: pass the test or meet the requirement. [INFO] SKIP: encounter some problems when running the diagnose. [INFO] FAIL: test failed or requirements are not met. [INFO] XXXX: the erdma-related information, e.g. erdma driver version, cc algorithm. Name Result Desc fail info ------------------------------------------------------------------------------------------------------------------------------ erdma device PASS erdma pci device is present erdma installed PASS erdma module has been installed erdma loaded PASS erdma module has been loaded ibverbs loaded PASS ib_uverbs module has been loaded erdma tools PASS eadm|rdma|ibv_devinfo tools have been installed hca detected PASS IB device exist hca active PASS status is PORT_ACTIVE erdma stats PASS no failed counter network config PASS network configuration seems ok erdma dmesg PASS no concerning error logs detected atomic support PASS atomic capacity support go-back-n support FAIL Go-back-N capacity support CHCK FAILED [eadm info -t ext_attr -d erdma_0 | grep -w attr_mask | awk '{print $2}'] erdma install mode Standard erdma installation mode kernel driver version 0.2.37 erdma kernel driver version rdma-core version 44.1-2 rdma-core version cc algorithm hpcc_rtt current cc algorithm
Diagnose the eRDMA HPC environment
HPC applications in an eRDMA environment may require additional dependencies and configurations. The diagnose tool checks for these dependencies.
Procedure:
Log on to the eRDMA-configured instance.
Download the diagnose tool.
Download from an internal URL
wget http://mirrors.cloud.aliyuncs.com/erdma/tools/diagnose.pyDownload from a public URL
wget https://mirrors.aliyun.com/erdma/tools/diagnose.py
Check HPC environment dependencies:
python diagnose.py --hpc-checkExample output. For diagnostic item descriptions, see eRDMA HPC environment dependency checks.
ecs-user@xxx ~$ python diagnose.py --hpc-check [INFO] Begin to run hpc related diagnoses for erdma. If the missing dependencies are not required, please ignore them. [INFO] The diagnose results mean: [INFO] PASS: pass the test or meet the requirement. [INFO] SKIP: encounter some problems when running the diagnose. [INFO] FAIL: test failed or requirements are not met. [INFO] XXXX: the erdma-related information, e.g. erdma driver version, cc algorithm. Name Result Desc fail info ---------------------------- ------------------- ------------------------------------------------------- ------------------- cc algorithm cubic current cc algorithm go-back-n support PASS Go-back-N capacity support dapl1 install FAIL dapl1 installation check CHCK FAILED [ls /etc/rdma/compat-dapl/dat.conf && ls /usr/lib64/libdaplcma.so.1.0.2] dapl2 install PASS dapl2 installation check dapl2 config PASS dapl2 erdma configuration check dapl2 test PASS dapl2 dtest result
Evaluate eRDMA network performance
Use the perftest feature in the diagnose tool to test network performance between instances.
Prerequisites
Before running the test:
eRDMA is installed and deployed on all test nodes. See Enable eRDMA for an ECS instance.
Passwordless SSH is configured among all test nodes. See Configure passwordless SSH logon.
Python paramiko is installed on all test nodes.
NoteThe diagnose tool uses paramiko for remote connections.
Install paramiko with the following commands. Python 3 is recommended.
Alibaba Cloud Linux/CentOS
# python3 sudo python3 -m pip install --upgrade pip sudo python3 -m pip install paramiko # python2 # If the pip module is not installed for Python 2, install python2-pip. sudo yum -y install python2-pip sudo python2 -m pip install --upgrade pip==20.3.4 sudo python2 -m pip install paramikoUbuntu
# python3 sudo python3 -m pip install --upgrade pip sudo python3 -m pip install paramiko # python2 # If python2-pip is not installed on the current node, install it. sudo apt install software-properties-common sudo add-apt-repository universe sudo apt update sudo apt install python2 sudo curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py sudo python2 get-pip.py sudo python2 -m pip install --upgrade pip==20.3.4 sudo python2 -m pip install paramiko
Procedure
Log on to the eRDMA-configured instance.
Download the diagnose tool.
Download from an internal URL
wget http://mirrors.cloud.aliyuncs.com/erdma/tools/diagnose.pyDownload from a public URL
wget https://mirrors.aliyun.com/erdma/tools/diagnose.py
Test eRDMA latency:
python diagnose.py --perftest --hosts <n1> <n2> --user <username> --key-file </path/to/private_key>Parameters:
--hosts <n1> <n2>: Test nodes, separated by spaces. Replace<n1> <n2>with the private IP address of the eRDMA-enabled ENI on each node.--user <username>: Username for passwordless SSH.--key-file </path/to/private_key>: Absolute path to the private key file for SSH.
Example output for two-instance latency test. See eRDMA network performance tests.
Each table shows latency for different operations. Rows represent requesters, columns represent responders. Cell values show average latency in microseconds (99.9th percentile in parentheses).
[ecs-xxx ~]$ python diagnose.py --perftest --hosts 172.17.0.87 172.17.0.86 --user ecs-user --key-file /home/ecs-user/.ssh/id_rsa /usr/local/lib/python3.6/site-packages/paramiko/transport.py:32: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. or Python 3.6. from cryptography.hazmat.backends import default_backend INFO:paramiko.transport:Connected (version 2.0, client OpenSSH_8.0) INFO:paramiko.transport:Authentication (publickey) successful! INFO:paramiko.transport:Connected (version 2.0, client OpenSSH_8.0) INFO:paramiko.transport:Authentication (publickey) successful! [INFO] Begin to run perftest, the results will be shown in table. [INFO] In each table, the line represents client while the column represents server. [INFO] Each table cell shows the average latency and p999 latency(in the bracket). [INFO] Current perftest configuration: [INFO] tests: send_lat read_lat write_lat message_size: 2 iterations: 10000 ---------------------------------------------------------------------- | ib_send_lat latency table(us) | ---------------------------------------------------------------------- | | 172.17.0.87 | 172.17.0.86 | ---------------------------------------------------------------------- | 172.17.0.87 | 14.60(87.53) | 14.29(25.25) | ---------------------------------------------------------------------- | 172.17.0.86 | 14.35(51.63) | 8.31(21.09) | ---------------------------------------------------------------------- ---------------------------------------------------------------------- | ib_read_lat latency table(us) | ---------------------------------------------------------------------- | | 172.17.0.87 | 172.17.0.86 | ---------------------------------------------------------------------- | 172.17.0.87 | 24.28(51.43) | 27.57(57.42) | ---------------------------------------------------------------------- | 172.17.0.86 | 27.43(41.14) | 13.88(49.83) | ---------------------------------------------------------------------- ---------------------------------------------------------------------- | ib_write_lat latency table(us) | ---------------------------------------------------------------------- | | 172.17.0.87 | 172.17.0.86 | ---------------------------------------------------------------------- | 172.17.0.87 | 183.71(25003.59) | 12.76(27.00) | ---------------------------------------------------------------------- | 172.17.0.86 | 12.80(26.05) | 6.41(13.75) | ----------------------------------------------------------------------