You can create Elastic Compute Service (ECS) instances of instance types that support elastic Remote Direct Memory Access (eRDMA) and bind elastic RDMA interfaces (ERIs) to the instances to use eRDMA and benefit from the large-scale networking capabilities and low latency of RDMA. ERIs are elastic network interfaces (ENIs) for which the ERI feature is enabled.
Enable eRDMA on an ECS instance
Select an instance type that supports eRDMA
For information about the enterprise-level CPU-based instance types that support eRDMA, see Configure eRDMA on an enterprise-level instance.
Bind ERIs to an ECS instance
You can enable the ERI feature for the primary ENI when you create an ECS instance or bind an ERI to an ECS instance after the instance is created.
Enable the ERI feature for an ENI when you create an ECS instance
For more information, see the Create an ERI when you create an ECS instance section of the "ERIs" topic.
Create an ERI and bind the ERI to an ECS instance
For information about how to create an ERI, see the Separately create an ERI section of the "ERIs" topic.
For information about how to bind an ERI to an ECS instance, see Bind a secondary ENI.
Enable the ERI feature for an ENI that is bound to an ECS instance
You can enable the ERI feature for an ENI that is bound to an ECS instance by modifying the attributes of the ENI. For more information, see the Change the status of the ERI feature for an existing ENI section of the "ERIs" topic.
Call API operations to create an ERI and bind the ERI to an ECS instance
Perform the following steps:
Call an API operation to create an ERI.
Call the CreateNetworkInterface operation to create an ENI and set the NetworkInterfaceTrafficMode parameter to HighPerformance to enable the ERI feature for the ENI.
After the call is successful, record the return value of the
NetworkInterfaceId
parameter, which is the ERI ID.Set the NetworkInterfaceId parameter to the return value recorded in the preceding step and the InstanceId parameter to the ID of an ECS instance and call the AttachNetworkInterface operation to bind the ERI to the ECS instance.
ImportantIf the instance type of the ECS instance supports multiple ERIs per instance, we recommend that you set the NetworkCardIndex parameter to a different value for each ERI when you bind multiple ERIs to the instance. This ensures that the ERIs are bound to different channels and the maximum network bandwidth is achieved for the instance. For more information, see the Request parameters section of the "AttachNetworkInterface" topic.
Install the eRDMA driver on an ECS instance
The eRDMA driver is developed by Alibaba Cloud in-house. Alibaba Cloud provides technical support for the eRDMA driver.
The installation process of the eRDMA driver requires a period of time to complete.
eRDMA driver installation packages
Install the eRDMA Driver
You can automatically install the eRDMA driver by selecting the Auto-install eRDMA Driver option when you create an ECS instance that supports eRDMA, or manually install the eRDMA driver after the instance is created.
For information about how to install the eRDMA driver on an enterprise-level CPU-based instance, see Configure eRDMA on an enterprise-level instance.
Check the version of the eRDMA kernel-mode driver
After the eRDMA driver is installed, you can run the
eadm ver
command to check the version of the eRDMA kernel-mode driver. The latest eRDMA driver version 1.4.0 corresponds to the eRDMA kernel-mode driver version 0.2.37.
Verify the correctness of eRDMA configurations
The ibv_devinfo
command helps check whether eRDMA functions as expected. You can run the ibv_devinfo
command to obtain information about devices, such as the hardware attributes, port status, and supported features of the devices. If at least one port is in the PORT_ACTIVE
state, RDMA components run as expected, and RDMA features are enabled and can be used as expected. For more information, see 13.7. Testing Early InfiniBand RDMA operation.
You can also pass the -v
parameter to the ibv_devinfo
command to query more detailed information about each device, including the hardware version, supported maximum message size, number of queues, and memory window size. You can optimize and check RDMA network performance based on the preceding information.
You can run the ibv_devinfo
command to verify the correctness of eRDMA configurations on an ECS instance.
Correct eRDMA configurations: The ERIs are bound to the ECS instance, and the eRDMA driver is installed on the instance as expected.
NoteIf the instance supports and is bound with multiple ERIs and the
state
field for the port of each eRDMA device on the instance isPORT_ACTIVE
, the ERIs function as expected.If the
state
field for the port of an ERI isinvalid state
, the ERI is abnormal. In this case, check whether the ERI is properly configured. For example, run theifconfig
command to check whether all configurations, including IP addresses, of the ERI exist. For more information, see Configure a secondary ENI.
No ERIs bound to the instance: The eRDMA driver is installed on the instance, but no ERIs are bound to the instance. In this case, you must bind ERIs to the instance. For more information, see the Bind ERIs to an ECS instance section of this topic.
eRDMA driver not installed as expected: ERIs are bound to the instance, but the eRDMA driver is not installed on the instance as expected. In this case, you must re-install the eRDMA driver on the instance. For more information, see the Install the eRDMA driver on an ECS instance section of this topic.
You can also use the diagnose tool to check the basic functionality of eRDMA. For more information, see the Use the diagnose tool to check RDMA-related issues and evaluate eRDMA performance section of the "Monitor and check eRDMA" topic.
Test eRDMA network performance
Perftest
is a performance test toolkit that provides various test options to evaluate network operations, such as the send, receive, read, and write operations. Perftest allows you to measure the performance metrics, such as latency and bandwidth, of RDMA operations. You can determine the performance of RDMA devices and networks based on the measurements and optimize configurations or resolve potential issues. For more information, see perftest.
Test programs included in perftest
Perftest includes a collection of test programs. You can use the test programs based on your business requirements to test network bandwidth or latency and evaluate network performance. The following table describes the test programs.
RDMA operation | Bandwidth test program | Latency test program |
Send | ib_send_bw (send bandwidth test) | ib_send_lat (send latency test) |
RDMA Read | ib_read_bw (read bandwidth test) | ib_read_lat (read latency test) |
RDMA Write | ib_write_bw (write bandwidth test) | ib_write_lat (write latency test) |
RDMA Atomic | ib_atomic_bw (atomic bandwidth test) | ib_atomic_lat (atomic latency test) |
Native Ethernet | raw_ethernet_bw (raw Ethernet bandwidth test) | raw_ethernet_lat (raw Ethernet latency test) |
Install perftest
You can download the perftest package from the official perftest repository and install perftest, or use a Yellowdog Updater, Modified (YUM) or Advanced Packaging Tool (APT) repository to install perftest.
Official perftest repository
Enable public bandwidth for an ECS instance on which you want to install perftest. For more information, see Enable public bandwidth for an ECS instance.
Download the perftest package from the official perftest repository and install perftest.
YUM or APT repository
Different versions of perftest are included in the repositories of different Linux distributions. Incompatibility may occur. To prevent incompatibility, we recommend that you identify the Linux distribution run by the ECS instance on which you want to install perftest and install the perftest version included in the repository of the same Linux distribution. Otherwise, download the perftest package from the official perftest repository and install perftest.
Alibaba Cloud Linux 3, CentOS, and Anolis OS
sudo yum install perftest -y
Ubuntu
sudo apt install perftest -y
Example of using perftest
You can run each test program included in perftest as a separate command. For example, run ib_send_lat
as a command to perform a send latency test.
Correct test parameters are crucial when you use perftest
to perform performance tests. By properly configuring the parameters, you can control perftest
behaviors in a more accurate manner to meet specific test requirements and obtain more accurate test results. The following table describes specific critical parameters of perftest
.
For information about how to perform a network latency test, see the Test the eRDMA write latency section of the "Configure eRDMA on an enterprise-level instance" toptic.
References
If you deploy applications in Docker containers on your instances, you can use eRDMA in the containers to achieve large-scale data transfers and high-performance network communications. For more information, see Use eRDMA in Docker containers.
You can use eRDMA in Alibaba Cloud Container Service for Kubernetes (ACK) clusters to provide low-latency and high-throughput network communication capabilities for all services and applications in the clusters. For more information, see Use eRDMA to accelerate container networking in ACK clusters.
You can monitor and check the real-time working status of eRDMA. For more information, see Monitor and check eRDMA.
You can integrate eRDMA into TCP applications. For more information, see Overview of adapting eRDMA and applications.