Enabling Java Sockets over Remote Direct Memory Access (JSOR) (Linux only)
JSOR is enabled by specifying a command line system property when you start your Java™ application. A valid configuration file must exist on both the Java application server and client systems, which specifies the RDMA rules for connection. If RDMA services are not available, you can optionally configure your server to receive TCP connections for plain sockets.
Before you begin
- This feature is available on the following platforms and Remote Direct Memory Access (RDMA) adapters:
- Linux® 32-bit x-86 with either InfiniBand (IB) or RDMA over Converged Ethernet (RoCE)
- Linux AMD64/EM64T with IB or RoCE
- Linux 32-bit POWER® with RoCE
- Linux 64-bit POWER with RoCE
- Linux 64-bit POWER8® (Little Endian) with IB
- You must install OpenFabrics Enterprise Distribution (OFED) v1.5.3 or later, which can be downloaded from the OpenFabrics Alliance website: https://www.openfabrics.org/index.php/resources/ofed-for-linux-ofed-for-windows/ofed-overview.html. During run time, symbols from the following libraries are dynamically located and loaded: librdmacm.so and libibverbs.so. These libraries are provided by the OFED run time.
- Users must have adequate permissions to lock memory on both host systems. RDMA socket buffers must be locked, or pinned, to avoid the operating system swapping out the memory pages during data transfers.
About this task
Procedure
Results
- Server: The switch to an RDMA connection occurs during the bind / accept stage.
- Client: The switch to an RDMA connection occurs during the bind / connect stage.
If you experience problems when you are trying to establish a connection between RDMA-enabled systems, you can use the JSOR trace facility to determine where the process is failing. For more information, see JSOR problem determination (Linux only).
Example
host1
, with the following configuration
rule:rdma accept host1 1500 host2
All the connections from
host2
accepted by host1
on the port 1500
are RDMA
connections.host2
, with the following configuration
rule:rdma connect host1 1500
All the connections that are made to
host1
on port 1500 are RDMA connections. java -Dcom.ibm.net.rdma.conf=<path>/server.conf Server
Or:java -Dcom.ibm.nio.rdma.conf=<path>/server.conf NIOServer
Where
<path>
is the fully qualified path to the configuration file.java -Dcom.ibm.net.rdma.conf=<path>/client.conf Client
Or:java -Dcom.ibm.nio.rdma.conf=<path>/client.conf NIOClient
Where
<path>
is the fully qualified path to the configuration file.What to do next
To optimize the performance of your RDMA-enabled applications, you should set and size resources for connection and data transfer. For managing socket send and receive buffers, and queue sizes, JSOR includes a set of Java environment variables. For more information, see JSOR environment settings (Linux only).