Lesson 3 / 11
Module 3Lesson 1⏱ 45 min study

Lesson 3: InfiniBand Protocol, RDMA, & AI Clusters

Examine Remote Direct Memory Access (RDMA), Host Channel Adapters (HCA), Subnet Managers, and lossless credit-based flow control.

✦ Key Architectural Takeaways
  • •InfiniBand eliminates host operating system kernel overhead and CPU context switches via user-space RDMA.
  • •Credit-based link-level flow control guarantees a strictly lossless fabric with zero dropped packets from buffer overflow.
  • •Subnet Managers discover fabric topology and program deterministic forwarding tables using Local Identifiers (LID).
  • •Distributed AI training clusters rely on InfiniBand to execute GPU AllReduce gradient synchronization at sub-microsecond latencies.

1. The Kernel Bypass & CPU Interrupt Bottleneck

In standard TCP/IP networking, moving a payload from an application on Server A to an application on Server B requires multiple memory copies and CPU interventions:

  1. 1The sending application copies data into kernel socket memory buffers (sk_buff).
  2. 2The kernel builds TCP and IP headers, calculates checksums, and programs NIC DMA rings.
  3. 3On packet arrival, the receiving NIC triggers a hardware interrupt, forcing the CPU to suspend its current thread, execute interrupt service routines, and copy data into user space.
ARCHITECTURE DIAGRAMSYSTEM SCHEMATIC
Traditional Socket Stack:
[ App Memory ] -> [ Kernel Buffer ] -> [ NIC Driver ] -> [ Wire ] (High Latency)

InfiniBand RDMA (Kernel Bypass):
[ App Memory ] ============ Direct Hardware DMA ============> [ HCA Adapter ]

For high-performance computing (HPC) and large-scale AI distributed training (where thousands of GPUs synchronize billions of neural network weights via AllReduce collectives), standard TCP socket overhead (15–50 microseconds) throttles GPU compute utilization.

§

2. Remote Direct Memory Access (RDMA) Mechanics

InfiniBand resolves this through Remote Direct Memory Access (RDMA):

  • Host Channel Adapters (HCA): Specialized network hardware with dedicated memory translation engines.
  • Queue Pairs (QP): Applications allocate a Send Queue (SQ) and Receive Queue (RQ) in user space. The application writes a Work Queue Element (WQE) directly to the HCA without invoking the operating system kernel.
  • One-Sided RDMA Operations:
  • RDMA Read: Reads memory directly from a remote node's physical RAM without notifying the remote CPU.
  • RDMA Write: Writes data into a remote node's registered memory address with zero remote CPU participation.
§

3. The Lossless Fabric: Credit-Based Flow Control

Unlike Ethernet, which permits packet dropping under buffer contention, InfiniBand is an architecturally lossless fabric:

  • Every link interface maintains an exact count of free receive buffers at the adjacent switch port.
  • Transmitters can only emit a packet if they possess an available credit.
  • As the receiving switch forwards packets out of its queue, it transmits Flow Control Packets (FCP) returning credits upstream. Packet drops due to buffer exhaustion are mathematically impossible.