Skip to content

Working with RDMA in RedHat/CentOS 6.*

5.00 avg. rating (98% score) - 2 votes

RedHat and CentOS 6.* have integrated RDMA support. In This post we'll discuss how to manage and work with the inbox RDMA packages in those distributions.

Installing RDMA packages

One can install all the RDMA packages manually one by one and resolve the dependency by himself. However, yum provides us an easy way to install all the needed packages for working with RDMA and resolve the dependencies in other packages automatically.

yum allows installation of multiple packages according to a specific area. Unlike its name may imply, the group "Infiniband Support" has all the relevant packages for RDMA support, i.e. InfiniBand, RoCE and iWARP, and not only InfiniBand. The following command will show which packages are part of the group "Infiniband Support":

[root@localhost]# yum groupinfo "Infiniband Support"
Loaded plugins: fastestmirror, security
Setting up Group Process
Loading mirror speeds from cached hostfile
* base:
* extras:
* updates: Infiniband Support
Description: Software designed for supporting clustering and grid connectivity using RDMA-based InfiniBand and iWARP fabrics.
Mandatory Packages:


Default Packages:


Optional Packages:


As one can see, there are several classifications for packages in this group: "mandatory", "default" and "optional". In RedHat/CentOS 6.* distributions (at least, for now), by default only the "mandatory" and  "default" packages will be installed. The following command line will install the needed packages that are needed to work with RDMA:

[root@localhost]# yum -y groupinstall "Infiniband Support"

The "optional" packages needs to be installed explicitly.  The following command line will install them:

[root@localhost]# yum --setopt=group_package_types=optional groupinstall "Infiniband Support"

Uninstalling RDMA packages

Just like we used yum to install the packages group, we'll use it to uninstall those packages, if they aren't needed anymore. The following command line will uninstall the RDMA packages:

[root@localhost]# yum -y groupremove "Infiniband Support"

Starting the RDMA services

Load the RDMA drivers using the following command line:

[root@localhost]# /etc/init.d/rdma start

If one is using the InfiniBand transport and he doesn't have a managed switch in the subnet, he has to start the Subnet Manager (SM). Doing this in one of the machines in the subnet is enough, this can be done with the following command line:

[root@localhost]# /etc/init.d/opensm start

If one wishes to start the RDMA service automatically when the operating system is loaded, the following command line will do the trick:

[root@localhost]# chkconfig --level 235 rdma on

Stopping the RDMA services

If the SM is running, then it must be stopped before unloading the drivers. Stop the SM using the following command line:

[root@localhost]# /etc/init.d/opensm stop

Unload the RDMA drivers using the following command line:

[root@localhost]# /etc/init.d/rdma stop

RDMA configuration file(s)

1. The rdma service loads the configuration file: /etc/rdma/rdma.conf. This file controls which modules will be loaded during the service  startup and some attributes about the RDMA modules. The following parameters are supported:

Parameter name Description Supported values
IPOIB_LOAD Load IPoIB module yes/no
SRP_LOAD Load SRP initiator module yes/no
ISER_LOAD Load ISER initiator module yes/no
RDS_LOAD Load RDS module yes/no
FIXUP_MTRR_REGS Modify the system mtrr registers yes/no
NFSoRDMA_LOAD Load NFSoRDMA service yes/no
NFSoRDMA_PORT TCP port that the NFSoRDMA service will listen to TCP port space: 1-65535 (default: 2050)

2. RDMA needs to work with pinned memory, i.e. memory which cannot be swapped out by the kernel. By default, every process that is running as a non-root user is allowed to pin a low amount of memory (64KB). In order to work properly as a non-root user, it is highly recommended to increase the size of memory which can be locked. Edit the file /etc/security/limits.conf and add the following lines:

* soft memlock unlimited
* hard memlock unlimited

This will allow process that is running as any user to pin unlimited amount of memory. Changing this line will become effective for new login sessions.

After login again, executing the following command line will print how much memory (in KB) can be locked:

ulimit -l

(the expected output is: "unlimited").

If one wishes to allow better control on this configuration: e.g. less memory to be pinned, or allow only specific user(s) to pin more memory - please refer to the Linux distribution manual.

Share Our Posts

Share this post through social bookmarks.

  • Delicious
  • Digg
  • Newsvine
  • RSS
  • StumbleUpon
  • Technorati


Tell us what do you think.

There are no comments on this entry.

Add a Comment

Fill in the form and submit.

Time limit is exhausted. Please reload CAPTCHA.