Configuring Locked Buffer Memory for RDMA

The base library reserves buffers for RDMA transports. These buffers are locked, that is, the operating system cannot swap them out to virtual memory. On Linux platforms, you must configure sufficient memory resources for these buffers.

For each RDMA connection the library attempts to allocate 4 megabytes of locked memory, that is, 128 buffers of length 32 kilobytes each: 64 buffers for sending messages and another 64 buffers for receiving messages.

Supply values either in kilobytes, or as the string unlimited.

This task is not necessary on non-Linux platforms.

Procedure

  1. On Linux platforms, set the user-level locked memory with the ulimit command.

    For example:

        ulimit -l unlimited
  2. On Linux platforms with the PAM limits module, set the system-level locked memory values in the file /etc/security/limits.conf

    For example:

        * soft memlock 8192
        * hard memlock unlimited