A simple client-server request-response program implemented using RDMA.
- The program uses RDMA CM library for RDMA connection setup
- The client can generate load using open loop or closed loop approach (
DO_CLOSED_LOOPmacro) - The client can opt for a CPU-efficient sender or a polling-based sender (
BLOCKING_SENDERmacro)
The purpose of this program to get used to the commonly used RDMA verbs and RDMA CM APIs. This repository gives a simple skeleton or husk of a scalable RPC application that needs RDMA as its transport. The following concepts are being exercises in this example program -
- Asynchronous RDMA CM APIs (in the server)
- Synchronous RDMA CM APIs (in the client)
- Generic control path RDMA verb APIS
- Protection Domains
- Memory Regions
- Completion Queues
- Completion Channels (for blocking/cpu-efficient datapath in the client)
- Queue Pairs
- Shared Receive Queues (for scalable and memory-efficient server)
- Generic data path RDMA verbs APIs
- Posting RECV Work Requests
- Posting SEND Work Requests
- Polling the Completion Queues
- Blocking on the Completion Channels
- Using bounded blocking on the Completion Channels using epoll
The following steps assume that you have an RDMA-capable NIC and that the libibverbs
and librdmacm libraries are installed on your system. If not, then please make sure
to install them.
g++ -O3 client.cc -libverbs -lrdmacm -o client
g++ -O3 server.cc -libverbs -lrdmacm -o server
Run the server
./server
Run the client (from another session)
./client