Enable RDMA for Volume Targets
The RDMA feature in Replicated PV Mayastor enables you to achieve better throughput and latency outcomes for the applications using Replicated PV Mayastor Volumes. This feature provides a significant performance boost by leveraging RDMA technology. A Kubernetes cluster consisting of nodes that have RNIC (RDMA Network Interface Card) can make use of this feature.
#
PrerequisitesBefore enabling and using RDMA in Replicated PV Mayastor, ensure the following prerequisites are met:
Interface Validation
Ensure that the interface name specified in
io-engine.target.nvmf.iface
exists on all io-engine nodes. Misconfiguration of this parameter can lead to unexpected behavior. If the interface name is not RDMA-capable on a node, Replicated PV Mayastor volume targets on such nodes will support only TCP connections.Application Node Requirements
Application nodes must also be RDMA-capable to connect to RDMA-enabled volume targets. This capability is independent of the Helm-provided interface name for
io-engine.target.nvmf.iface
. RDMA connections will work as long as the application node has an RDMA-capable device.TCP Fallback Behavior
If an application is hosted on a non-RDMA-capable node, connections to RDMA-enabled volume targets will default to TCP. The TCP fallback behaviour can be disabled by setting the Helm chart value
csi.node.nvme.tcpFallback
tofalse
. In this configuration, the initiator (application) node will continuously attempt RDMA connections, resulting in connection failures. To mitigate this, you can either keep the fallback option enabled or relocate the application pod to an RDMA-capable node, provided the pod's resource type allows for such movement.Soft-RoCEv2 Support
Replicated PV Mayastor also supports software RDMA (Soft-RoCEv2) for nodes that do not have RDMA-capable hardware network interface cards. RDMA devices can be manually created using
ibverbs
utilities. For example, to create an RDMA device namedrxe0
on an Ethernet interfaceeth0
, run:Once created,
rxe0
can be utilized as outlined in the Enablement section.note
The IP address assignments to RDMA GIDs on these devices depends on the cluster's networking and CNI configurations. Variations in Soft-RoCEv2 device gid IP assignments are not fully known and have not been extensively tested.
#
Enable RDMATo enable the RDMA feature via Helm:
Set
io-engine.target.nvmf.rdma.enabled
totrue
.Set
io-engine.target.nvmf.iface
to a valid network interface name that exists on an RNIC.Verify that all nodes are properly configured with RDMA-capable hardware and that network interfaces are correctly identified and accessible.
info
Once enabled, all Replicated PV Mayastor volumes will connect over RDMA.
#
Performance Results#
Setup DetailsSingle-replica volume
Application, volume target, and replica located on the same node
Application connects to the volume target using NVMe-oF
The table below compares performance metrics for RDMA and TCP under specific workloads:
Workload | TCP Throughput | RDMA Throughput | TCP Latency | RDMA Latency |
---|---|---|---|---|
Sequential Read 4k | 563 MB/s | 1256 MB/s | 931.1 us | 416.9 us |
Random Write 4k | 323 MB/s | 474 MB/s | 1624.4 us | 1105.4 us |