Large-scale parallel computing such as distributed training is highly sensitive to inter-node communication latency. Remote direct memory access (RDMA) bypasses the kernel network stack to reduce that latency. The RDMA device plugin add-on registers RDMA NICs on Lingjun nodes as Kubernetes extended resources that pods can request.
RDMA usage modes
The RDMA device plugin supports two device modes:
Mode | Description | Limits |
shared | Default mode. The RDMA device is registered as the | Does not support device isolation or NUMA topology-aware scheduling. |
exclusive | The RDMA device is registered as the | For the limits, see Use RDMA exclusive mode. |
RDMA supports the following three usage modes. Shared mode supports both hostNetwork and non-hostNetwork networking, whereas exclusive mode supports only non-hostNetwork networking.
Usage mode | Network mode | Lingjun IPv6 requirement | Scenarios |
hostNetwork + shared (default) |
| Not required | Highest network performance, with multiple pods sharing one NIC. |
non-hostNetwork + shared |
| Required | Independent pod IP addresses, with multiple pods sharing one NIC. |
non-hostNetwork + exclusive |
| Required | Exclusive use of one physical NIC per pod, with device isolation and NUMA topology-aware scheduling. |
Prerequisites
An ACK managed Pro cluster is created and Lingjun nodes are added. For more information, see Lingjun node pools.
For non-hostNetwork mode, the Lingjun bare metal cluster is created with IPv6 as the compute network IP version. Otherwise, the RDMA configuration does not take effect.
Install the RDMA device plugin add-on
Log on to the ACK console. In the left-side navigation pane, choose Clusters.
On the Clusters page, click the name of your cluster. In the left-side navigation pane, choose Add-ons.
On the Add-ons page, click Install. Find the ack-rdma-device-plugin add-on, configure it as prompted, and complete the installation.
Configuration item
Description
Enable RDMA network support (non-hostNetwork mode)
Valid values:
False (cleared): Only pods in hostNetwork mode can use the RDMA network.
True (selected): Pods in non-hostNetwork mode can use the RDMA network.
Before you enable this option, make sure that the Lingjun bare metal cluster associated with the ACK cluster uses IPv6. Otherwise, the RDMA configuration does not take effect.
customResourceNameThe name of the RDMA resource. Default value:
rdma/hca. Custom names are supported.
Verify the installation
After the installation is complete, run the following command to verify that the RDMA device plugin runs as expected:
kubectl get ds ack-rdma-dp-ds -n kube-systemExpected output:
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
ack-rdma-dp-ds 2 2 2 2 2 <none> xxhRun the following command to check whether the node reports the rdma/hca resource:
kubectl describe node <node-name> | grep rdma/hcaIn shared mode, the expected output is
rdma/hca: 1k.In exclusive mode, the expected output is
rdma/hca: 4. The actual number of devices varies with the instance type.
Usage notes
Both modes use the same resource name
rdma/hca, which can be customized. The modes are distinguished by node labels.Before you switch the mode, make sure that no pod on the node uses the
rdma/hcaresource. Otherwise, the switch invalidates the device allocations of the existing pods. Switch the mode in the node pool configuration.For the limits of exclusive mode, see Use RDMA exclusive mode.