Enabling RoCE

Remote Direct Memory Access (RDMA) over Converged Ethernet (RoCE) is a network protocol that allows direct access to the memory of another server without use of the CPU or operating system.

The current state of the OFED and firmware driver enables the optimization for performance and latency and simultaneously for better availability. It supports individual ports, multiple fabrics, and classical network bond to protect a service IP from network failures. With the current Mellanox OFED driver and adapter firmware, Mellanox supports RoCEv2 over bonded interface ports from one physical NIC.

RDMA provides faster access from one node data to another node. Direct memory access from the memory of one node to the memory of another node without involving the CPU or system resources of the kernel allows more efficient use of the environment. The network and host performance improve significantly because of lower latency, lower CPU load, and higher bandwidth. In contrast, TCP/IP communications require copy operations, which add latency and use CPU and memory resources.

Figure 1. Comparison between TCP/IP and RoCE communications
RoCE and TCP/IP communication

The resources, which are needed for communication by using TCP/IP, are saved and can be used for real workload of the applications.

Figure 2. Comparison between TCP/IP on CPU and RDMA/TCP/IP off CPU
TCP/IP on CPU and RDMA/TCP/IP off CPU
RDMA provides the following two benefits:
  • Scales out bandwidth over multiple ports, which saves system resources.
  • The higher network bandwidth results in more saving effects by using RDMA on the operating system.

IBM Storage Scale support matrix

IBM Storage Scale supports RDMA on Red Hat® Enterprise Linux® Start of changeand UbuntuEnd of change. IBM Storage Scale uses the VERBS programming interface to provide RDMA support. While IBM Storage Scale uses the VERBS programming interface for RDMA support, the underlying implementation of RDMA is vendor-specific.

IBM Storage Scale supports RDMA with RoCEv2 with in the following configurations:
  • Supported on Red Hat Enterprise Linux Start of changeand UbuntuEnd of change
  • Supported on platform x86_64 and ppc64le
  • Minimum Mellanox OFED Level 4.9 or later
  • Minimum IBM Storage Scale System 7.0.1.x
  • Minimum IBM Storage Scale System models 5000, 3000, 3200, and 3500.
  • The minimum supported OS level is RHEL 9.4 for IBM Storage Scale System 7.0.1.x

RDMA requirements and limitations

The following restrictions apply for IBM Storage Scale RDMA:
  • The protocols export over CES (NFS or SMB) does not use RDMA.
  • Due to the TCP/IP implementation of current IBM Storage Scale releases, any additional network port apart from the mmfsd IP interface, needs to be on a different subnet. The mmfsd works itself for daemon-to-daemon communication.
  • IBM Storage Scale does not support InfiniBand and Omni-Path partition keys.
  • IPv6 must be enabled to use RoCE, if interfaces are selected by using the port name.
  • IPv6 local link address needs to be conformed with IPV6_ADDR_GEN_MODE=eui64.

Mellanox requirements and limitations

  • RDMA is not supported on a node when both Mellanox HCAs and Intel Omni-Path HFIs are enabled for RDMA.
  • You cannot use bonded ports across different adapters for use with RoCE.
  • You need to have Connect X-6 adapters or later for RoCE.

RoCE configuration methods

You can deploy RoCE environment by using one of the following methods:
  • Single-port configuration

    Each node uses a single adapter port connected to the network. The same port handles both TCP/IP daemon communication and RoCE traffic concurrently.

  • Multi-port configuration

    Each node uses multiple ports connected to the network.

    One port is used for both TCP/IP daemon communication and RDMA. The remaining ports are dedicated to RDMA and RoCE traffic. This approach allows you to scale out bandwidth to achieve the desired performance levels. Although it is more complex to configure, it offers greater flexibility and performance scalability.
  • Network bonding configuration
    IBM and Mellanox introduced a method to create a network bond by using two ports from the same adapter. This configuration
    • Provides redundancy and fault tolerance, protecting against cable, port, or switch failures.
    • Ensures high availability and reliability.

Network requirements

For running RoCE, you can get the best performance when the network is configured as a lossless network. Depending on the vendor, components, and the topology, the requirement for the lossless network can quickly become complex and is out of scope.

For more information, see Network configuration examples for RoCE deployment.

Make sure that Mellanox OFED driver is installed on all the nodes in the cluster. The IBM Storage Scale System I/O server nodes are maintained by an IBM Storage Scale deployment. You can check the installed version by using the ofed_info -s command as shown in the following example:
ofed_info -s
MLNX_OFED_LINUX-x.x.x.x.x
Note: The minimum level of OFED version is documented in the release notes of IBM Storage Scale Systems.

Make sure that the IBM Storage Scale client nodes run the same MOFED level as the NSD and IBM Storage Scale System. However, in many projects and environments, it is a challenge to maintain all nodes with the same MOFED level.

It is possible that the client nodes are running the OFED software, which is distributed by the operating system. Such configurations are simple to operate and to maintain in the client clusters. However, in cases of trouble and network glitches, such configurations can cause unexpected failures.

Network topology

The acronym host is used for an endpoint in the network. It can be an IBM Storage Scale client system or an IBM Storage Scale System and NSD system.

A host configuration depends on the number of network ports that are used or needed. The number of ports a node connects with the network depends on the expected bandwidth, the number of subnets that are needed to get access to other environments and high availability requirements.

In TCP/IP environments, scaling bandwidth with multiple ports is commonly acquired with bonding network ports, which are known as link aggregation. But bonding can have some challenging complexities. It makes the deployment complex from the network perspective.

Bonding is a commonly used technology in data centers for balancing the traffic in a network. However, bonding does not help single-socket network traffic to use more than one cable. Further more, another major shortcoming of bonding is that the selection of network path is hard to predict or cannot be controlled from the application layer. Therefore, when you scale bandwidth over multiple ports, the use of RoCE is the most appropriate option.

To use a bond or not with an IBM Storage Scale system, the generic rule is to have at least one IP interface that is connected to the network for the daemon-to-daemon communication. A recommended network topology with bonding and RoCE is shown in the following figure.

Figure 3. Displaying network topology with bonding
Network topology

Depending on using a bond, it is considered that the LACP link aggregation needs to be set in the network. Alternatively, by using IBM Storage Scale and IBM Storage Scale System building blocks, you can also rely on higher HA layers in IBM Storage Scale such as NSD and recovery group server fail over and can consider skipping bonds in your topology to make the network set up less complex. For better performance and less complex setup, it is recommended to use a configuration without bond.

For better availability, use bonded configuration. An example for a configuration without bond is shown in the following figure.

Figure 4. Showing configuration without bond
Showing configuration without bond

As shown in the figure, for network topology without bond, it is essential to have one IP address per network port. On the adapter that has the mmfsd IP address that is configured, additional RoCE IP address nor alias is needed until nodes in your cluster are able to communicate to this mmfsd IP address. You can configure as many aliases as the operating system version supports. You need one IP per adapter and RoCE can also use the existing IP, which is also used for TCP/IP traffic.

Running a configuration without bonds allows to later in the GPFS configuration, one can enhance the whole configuration by fabric numbers. By using such configuration, traffic on the ISL (inter-switch links) might be avoided.

Note: The adapters in a RoCE enabled environment can run TCP/IP traffic and RDMA traffic simultaneously.

MTU consideration

RDMA was introduced on InfiniBand networks. RDMA over InfiniBand supports maximum transmission unit (MTU) sizes from 256 up to 4096 Bytes.

It is recommended to adjust the MTU to jumbo frames, which is 9000 Bytes. Adjust this setting on all adapters and all nodes, communicating in your clusters. If you need to communicate with external nodes in remote networks and you cannot be sure that the path through the network supports MTU 9000 Bytes end–to–end, make sure that MTU Path Discovery is enabled. The MTU Path Discovery is enabled by default on Red Hat Enterprise Linux.

Tip: MTU can be set for the bond only when it is being getting created by using the --create-bond switch. Once the bond has been created, the MTU cannot be modified by using the essgennetwork command. The essgennetwork command does not support to reconfigure the MTU for an existing bond or an interface. A user must use the nmcli command or manually edit the ifcfg network configuration file and change the MTU value. Once MTU changes are applied, reload the new connection configuration by using the nmcli config load command and restart the bond or the interface by using the ifdown <interface_name> command followed by ifup <intreface_name>.

Configuring a bond

For RoCEv2 to work properly, all interfaces need an IPv6 local link address and an IPv4 address.

The bond interfaces configuration is not needed to run RoCE. If you do not need a bonded TCP/IP interface, you can proceed with next section.

If you want avoid port failures for your IP interfaces, configure the bonds.
Note: If you do not need the daemon IP address to be protected by a bond, skip this step.
Note: To configure RoCE over bond, the bond must be created before you use the essgennnetwork command. If a bond is created by using more than two physical network interfaces, then the existing bond must be broken and recreated by using same physical card. For example, if a bond is created by using four ports and two physical cards, then the bond must be broken and a new bond must be created by using two ports with the same physical card.
Complete the following to enable RoCE over bond.
  1. Create a bond by using two interfaces.
    essgennetworks -N <IOnoden> --suffix=-ce --interface enp1s0f0,enp1s0f0f1 --create-bond --hash-policy layer3+4 --bond bond0 --mtu 9000 --miimon 1000
    A sample output is as follows:
    2021-10-25T03:30:24.978336 [INFO] Starting network generation...
    2021-10-25T03:30:25.040319 [INFO] nodelist:  <IOnoden>
    2021-10-25T03:30:25.040386 [INFO] suffix used for network hostname: -ce
    2021-10-25T03:30:25.040430 [INFO] Bond will be created using --hash-policy layer3+4 which is required to configure RoCE over Bond.
    2021-10-25T03:30:25.040464 [INFO] Bond will be created using miimon 1000
    2021-10-25T03:30:25.040495 [INFO] Bond will be created with --mtu 9000. Make sure switch is configured to use 9000 MTU or set to auto negotiate.
    2021-10-25T03:30:25.040526 [WARN] Make sure switch is configured to handle Jumbo frame before creating bond.
    2021-10-25T03:30:25.040556 [WARN] Without Jubmo frame configuration at switch may result to network outage.
    2021-10-25T03:30:25.040586 [WARN] Consider testing once configured. Example: ping -s 9000 -c 10 TARGET_NODE-hs
    2021-10-25T03:30:50.356662 [INFO] Interface(s) available on node <IOnoden>-ce
    2021-10-25T03:30:50.356748 [INFO] Considered interface(s) of node <IOnoden>-ce are ['enp1s0f0'] with RDMA Port ['mlx5_0'] for this operation
    2021-10-25T03:30:50.360236 [INFO] Checking for IP address assignment on node(s)
    2021-10-25T03:30:50.364861 [INFO] <IOnoden>-ce: Current IP Address: IP not assigned
    2021-10-25T03:30:50.367996 [INFO] Creating network bond bond0 on node <IOnoden>-ce with IP Address 192.168.2.51
    2021-10-25T03:30:50.670300 [WARN] <IOnoden>-ce: Bond created with one slave interface
    2021-10-25T03:30:51.734465 [INFO] Network bond bond0 on node <IOnoden>-ce with IP Address 192.168.2.51 has been created successfully.
    2021-10-25T03:30:51.738006 [INFO] Network Bond with name bond0 is UP and connected at node <IOnoden>-ce
    2021-10-25T03:30:51.738055 [INFO] Bond creation complete. Reloading connections.
    
    Note: A bond is created by using the hash policy layer3+4.
    Tip: MTU can only be set for the bond while it is getting created by using the --create-bond switch. After the bond has been created, the MTU cannot be modified by using the essgennetwork command. The essgennetwork command does not support to reconfigure the MTU for an existing bond or an interface. A user must use the nmcli command or manually edit the ifcfg network configuration file and change the MTU value. After MTU changes are applied, reload the new connection configuration by using the nmcli config load command and restart the bond or the interface by using the ifdown <interface_name> command followed by ifup <intreface_name>.
  2. Enable the RoCE by using the created bond.
    essgennetworks -N <MSn> --suffix=-ce --bond bond0 --enableRoCE
    A sample output is as follows:
    2021-10-25T02:13:32.989606 [INFO] Starting network generation...
    2021-10-25T02:13:33.053310 [INFO] nodelist:  <MSn>
    2021-10-25T02:13:33.053370 [INFO] suffix used for network hostname: -ce
    2021-10-25T02:14:26.325569 [INFO] Interface(s) available on node <MSn>-ce
    2021-10-25T02:14:26.325636 [INFO] Considered interface(s) of node <MSn>-ce are ['bond0'] with RDMA Port ['mlx5_bond_0'] for this operation
    2021-10-25T02:14:26.693602 [INFO] Supported Mellanox RoCE card found at node <MSn>
    2021-10-25T02:14:26.697197 [INFO] Supported version of Mellanox OFED found at node <MSn>-ce
    2021-10-25T02:14:40.007004 [INFO] Bond validation passed and found bonds bond0 has been created using same physical network adapter at node <MSn>-ce
    2021-10-25T02:14:40.011375 [INFO] Bond MTU validation passed and found bonds MTU set to 9000 at node <MSn>-ce
    2021-10-25T02:14:40.015525 [INFO] Interface bond0 have the IPv4 Address assigned at node <MSn>-ce
    2021-10-25T02:14:40.019593 [INFO] Interface bond0 have the IPv6 Address assigned at node <MSn>-ce
    2021-10-25T02:14:40.019648 [INFO] Enabling RDMA for Ports ['mlx5_bond_0']
    2021-10-25T02:14:48.370397 [INFO] Enabled RDMA i.e. RoCE over Ethernet using bond bond0
    2021-10-25T02:14:48.370446 [INFO] Please recycle the GPFS daemon on those nodes where RoCE has been enabled.
    
    Note: The GPFS daemon must be recycled to make the RoCE configuration working. After the daemon gets recycled, you can run the mmdiag –network command to check whether the RDMA is enabled over Ethernet.
Advantages and disadvantages of using bond with RoCE:
  • A bonded interface protects against port and cable failures.
  • For running RDMA, all ports of the bonded interface need to be on one, the same, physical PCI adapter. So, an adapter failure is not covered in such configurations.
  • Creating bonds over multiple switches makes MLAG configuration mandatory in a network, which can cause unbalanced network use in the fabric.

Configuring regular IP interface

For RoCEv2 to work properly, all interfaces need an Ipv6 local link address and an IPv4 address. Configure all interfaces intended to use for RoCE communication, as shown in the following example.

Figure 5. Configuring interfaces
Configuring interfaces
As highlighted in black, make sure that only one IP interface has an IP address for the mmfs daemon communication. All other interfaces need to be on a different subnet.
  1. Assign IPv4 to high-speed interface.
    essgennetworks -N <IOnoden> --suffix=-ce --interface enP48p1s0f0 --assignip 192.168.4.51
    A sample output is as follows:
    2021-10-25T04:40:58.779195 [INFO] Starting network generation...
    2021-10-25T04:40:58.842575 [INFO] nodelist:  <IOnoden>
    2021-10-25T04:40:58.842642 [INFO] suffix used for network hostname: -ce
    2021-10-25T04:41:22.178448 [INFO] Interface(s) available on node <IOnoden>-ce
    2021-10-25T04:41:22.178533 [INFO] Considered interface(s) of node <IOnoden>-ce are ['enP48p1s0f0'] with RDMA Port ['Inbuilt'] for this operation
    
    2021-10-25T04:41:22.178591 [INFO] Checking for IP address assignment on node(s)
    2021-10-25T04:41:22.182983 [INFO] <IOnoden>-ce: Current IP Address: IP not assigned
    
    2021-10-25T04:41:22.183057 [INFO] Interface name enP48p1s0f0 consider for IP assignment with IP address 192.168.4.51 for node <IOnoden>-ce
    2021-10-25T04:41:22.308265 [INFO] Successfully assigned IP Address to interface enP48p1s0f0 at node <IOnoden>-ce
    2021-10-25T04:41:22.506151 [INFO] IP Assignment successful. Reloading connections.
    [PASS] essgennetworks passed successfully
    
  2. If you are using only one subnet, do not enable routing. For multiple networks in same subnet, must configure routing to route the RoCE traffic by using all subnets. To enable routing for a subnet, see the Configuring routing section. In the following example, only one subnet 192.168.4.0/24 is used. Therefore, you can enable RoCE by using the –enableRoCE command with the –interface switch. However, it is safe to enable routing even only one subnet is in use, by issuing the following command:
    essgennetworks -N <IOnoden> --suffix=-ce --interface enP48p1s0f0 --enableRoCE
    A sample output is as follows:
    2021-10-25T04:43:15.983035 [INFO] Starting network generation...
    2021-10-25T04:43:16.045174 [INFO] nodelist:  <IOnoden>
    2021-10-25T04:43:16.045243 [INFO] suffix used for network hostname: -ce
    2021-10-25T04:43:39.040751 [INFO] Interface(s) available on node <IOnoden>-ce
    2021-10-25T04:43:39.040829 [INFO] Considered interface(s) of node <IOnoden>-ce are ['enP48p1s0f0'] with RDMA Port ['mlx5_2'] for this operation
    2021-10-25T04:43:39.348322 [WARN] MTU is NOT set to 9000 for interface enP48p1s0f0 at node <IOnoden>. It's advisible to set MTU as 9000 for better performance.
    2021-10-25T04:43:39.348381 [WARN] Interface MTU NOT set to 9000 at node <IOnoden>-ce
    2021-10-25T04:43:39.348413 [WARN] Please re-configure the interface with --mtu 9000 and make sure switch is also configured to use --mtu 9000 i.e. Jumbo frame for better performance at node <IOnoden>-ce
    2021-10-25T04:43:39.352619 [INFO] Interface enP48p1s0f0 have the IPv4 Address assigned at node <IOnoden>-ce
    2021-10-25T04:43:39.356763 [INFO] Interface enP48p1s0f0 have the IPv6 Address assigned at node <IOnoden>-ce
    2021-10-25T04:43:39.356817 [INFO] Enabling RDMA for Ports ['mlx5_2']
    2021-10-25T04:43:45.409405 [INFO] Enabled RDMA i.e. RoCE over Ethernet using Ethernet interfaces enP48p1s0f0
    2021-10-25T04:43:45.409464 [INFO] Please recycle the GPFS daemon on those nodes where RoCE has been enabled.
    
    Note: If you want to enable RoCE for bond and interfaces both, then use –interface and –bond switch with the –enabelRoCE to enable it.

    GPFS daemon must be recycled to make the RoCE configuration working. After the daemon is recycled you can run the mmdiag –network command to check whether the RDMA is enabled over Ethernet.

Tip: The multiple verbsPortsFabric configuration is not supported as of now by using the essgennnetwork command. For example, if a user wants to configure fabric for bond as "/1/1" and for interfaces "/1/2", then the essgennetwork command does not have the option to configure it. The user needs to use the mmchconfig verbsPorts="mlx5_bond_0/1/1 mlx5_2/1/2 mlx5_3/1/2 command to enable the multiple fabrics for RoCE. GPFS daemon must be recycled after the mmchconfig verbsPorts parameter is used.

Configuring routing

In Figure 5, the mmfsd communication runs in the 192.168.12.0/24 network. All other Mellanox cards interfaces are highlighted in green and configured to be in the subnet 10.10.10.x/24. All interfaces are intended to use for RDMA communication, while only the IP addresses in 192.168.12.0/24 network are used for TCP/IP communication.

With current IBM Storage Scale releases, only one IP address per node is supported for communication to the mmfs daemon's network.

To scale out over multiple ports, RoCE can be used. But according to the definition of OFED standards, each RDMA interface needs to have an IP address to maintain the connection.

To use multiple interfaces, you need to configure multiple subnets. It is complex for larger environments and technically not needed. It is possible to configure all interfaces that are intended to be used for RDMA into one separate subnet.

As a limitation of the Red Hat Enterprise Linux kernel, multiple interfaces to the same subnets are complex. When you have more than one interface per subnet on a node, answering arp requests, selecting rules for outgoing IP traffic, and other complexities need to be reconsidered. To resolve such issues, you must add some special routing tables, described in 2. You need to specify routing entries for each interface and for all subnets, where you have more than one interface connected.

In example, each I/O server node has four interfaces that are connected to the same physical network. These interfaces need to get an IP address in a different IP-range(subnet) than the mmfsd but they are all in the same network. Refer to the following figure for topology overview.

Figure 6. Displaying topology overview
Displaying topology overview

For each green-marked interface, a routing entry is needed.

  1. Enable routing for each RoCE interface.
    essgennetworks -N <IOnoden> --configureRouteForRoCE --roceRoutingTableId 101 --roceRoutingTableName t1 --interface enP48p1s0f0
    A sample output is as follows:
    2021-10-25T04:51:53.048486 [INFO] Starting network generation...
    2021-10-25T04:51:53.111121 [INFO] nodelist:  <IOnoden>
    2021-10-25T04:52:13.897913 [INFO] Interface(s) available on node <IOnoden>
    2021-10-25T04:52:13.897991 [INFO] Considered interface(s) of node <IOnoden> are ['enP48p1s0f0'] with RDMA Port ['mlx5_2'] for this operation
    2021-10-25T04:52:14.202172 [WARN] MTU is NOT set to 9000 for interface enP48p1s0f0 at node <IOnoden>. It's advisible to set MTU as 9000 for better performance.
    2021-10-25T04:52:14.202235 [WARN] Interface MTU NOT set to 9000 at node <IOnoden>
    2021-10-25T04:52:14.202268 [WARN] Please re-configure the interface with --mtu 9000 and make sure switch is also configured to use --mtu 9000 i.e. Jumbo frame for better performance at node <IOnoden>
    2021-10-25T04:52:14.206459 [INFO] Interface enP48p1s0f0 have the IPv4 Address assigned at node <IOnoden>
    2021-10-25T04:52:14.210723 [INFO] Interface enP48p1s0f0 have the IPv6 Address assigned at node <IOnoden>
    2021-10-25T04:52:14.225432 [INFO] RoCE routing validation passes.
    2021-10-25T04:52:14.225488 [INFO] Setting UP routing for interface RDMA for Interface ['enP48p1s0f0'] at node <IOnoden>
    2021-10-25T04:52:14.228225 [INFO] Successfully added routing id and it's table name inside /etc/iproute2/rt_tables at node <IOnoden>
    2021-10-25T04:52:14.672155 [INFO] Successfully configured route for interface enP48p1s0f0 at node <IOnoden>
    2021-10-25T04:52:14.672219 [INFO} Routing configuration for subnet has configured successfully.
  2. Check the routing table entry.
    ip r
    10.111.222.100/30 dev enP1p8s0f3 proto kernel scope link src 10.111.222.101 metric 101 linkdown
    192.168.2.0/24 dev bond0 proto kernel scope link src 192.168.2.51 metric 300
    192.168.4.0/24 dev enP48p1s0f0 proto kernel scope link src 192.168.4.51 metric 104
    192.168.15.0/24 dev enP1p8s0f0 proto kernel scope link src 192.168.15.51 metric 100

    Repeat these steps to configure multiple RoCE interfaces for all interfaces .

Configuring the sysctl file

In addition to the interface scripts, you need system-wide settings that are managed by sysctl. Depending on the IBM Storage Scale System version, a customized sysctl setting is available by a tuned profile, which is named as scale. You need to edit the /etc/tuned/scale/tuned.conf file. For any other client node in your cluster, you can deploy the same sysctl configuration file.

  1. Ensure that the following sysctl settings are applied:
    net.ipv6.conf.all.disable_ipv6=0
    net.ipv6.conf.default.disable_ipv6=0
    Note: The IPv6 configuration can be enabled by the default IBM Storage Scale System deployment process.
  2. Validate the verbsPorts configuration.
    mmlsconfig
    [<MSn>-ce,<IOnode1>-ce,<IOnode2>-ce]
    verbsRdma enable
    verbsRdmaCm enable
    verbsRdmaSend yes
    [<MSn>-ce,<IOnode2>-ce]
    verbsPorts mlx5_bond_0
    [<IOnode1>-ce]
    verbsPorts mlx5_2
  3. You can run the mmdiag --network command and check for the verbsRDMA connection.