InfiniBand Field Guide
A friendly guide for ML people

How InfiniBand moves your gradients

When thousands of GPUs train one model, they spend a lot of time swapping data. InfiniBand is the network most big clusters use for that. This page walks through how it works, one picture at a time. No networking background needed.

Part 1

The big idea

Ethernet, the network your laptop uses, was built for the internet. Nobody owns the whole internet, so every switch has to figure things out on its own, and losing a packet now and then is treated as normal.

InfiniBand was built for a different world. One owner, one building, one job, which is moving memory from one machine to another as fast as possible. Once you can assume a single owner, you can make very different design choices. The rest of this page is about those choices.

The whole thing in one line Smart network cards, dumb fast switches, one central brain that sets everything up, and links that never throw packets away.
Part 2

Meet the cast

Subnet Manager Spine Spine Leaf Leaf Leaf Leaf 8 servers. Each one has a GPU and its own HCA (network card).
A tiny InfiniBand network, which people call a fabric. Servers plug into leaf switches, and every leaf connects to every spine. This shape is called a fat tree. Real clusters add a third tier on top to reach thousands of servers.
THE NETWORK CARD

HCA

Short for Host Channel Adapter, InfiniBand's name for a network card. It is a small computer of its own. It reads memory, builds packets and handles retries in hardware, so the CPU can stay out of it. In GPU clusters each GPU usually gets its own HCA.

THE ROAD JUNCTION

Switch

Forwards packets. On the fast path it does exactly one thing. It looks up the destination in a table and sends the packet out the matching port.

THE ADDRESS

LID

Every port on the fabric gets a small number called a LID, short for Local Identifier. Each packet carries the LID it is headed to, a bit like an apartment number on an envelope.

THE BRAIN

Subnet Manager

A piece of software running somewhere on the fabric. It hands out every address and fills in every switch's table. More on why it exists in Part 6.

Part 3

Follow one packet

Let's follow a chunk of gradients from a GPU on Server A to a GPU on Server B. Step through it with the buttons.

more switches and servers… Spine S Leaf L1 Leaf L3 SERVER A GPU HCA PCIe SERVER B HCA GPU PCIe LID 42 data

Two things to notice. The switches never think, they only look things up. And neither CPU ever touches the data. Software leaves a note for the HCA and hardware does the rest. That second idea is called RDMA, short for Remote Direct Memory Access.

Part 4

Switches just look things up

Each switch holds a forwarding table. It is basically an array where the index is a destination address and the value is which port to send the packet out of. Here is what Leaf L1's table might look like.

Destination LIDSend out portWhich leads to
71Server A
92Server A2, the neighbour
423Up to Spine S
554Up to the other spine
A packet for LID 42 arrives, the switch reads row 42, and out it goes on port 3. That really is the whole job.

There is no learning and no route calculation inside the switch, which keeps it simple and very fast. But it raises an obvious question. Who fills in the table? Hold that thought for Part 6.

Part 5

Links never throw packets away

On Ethernet, a switch with a full buffer simply drops new packets. TCP on the sending computer eventually notices and resends. That works, but the waiting and resending hurts a lot when thousands of GPUs are all waiting on each other.

InfiniBand uses credits instead. The receiver tells the sender how much buffer space it has free. Each packet costs one credit. No credits means no sending, so the sender pauses until the receiver frees up space and hands a credit back.

SENDER 4 credits one per free slot link credits flow back ← RECEIVER BUFFER
Press Send a few times until the buffer fills, then keep pressing. Then try Ethernet mode.

This is called lossless flow control. Congestion makes senders wait, and nothing gets thrown away.

Part 6

Why the network needs a brain

Go back to the packet's trip in Part 3. It only worked because every port already had an address and every switch already had a full table. When you first power on a cluster, none of that exists.

Just powered on Switch table is empty ? ? ? ServerLID ? ServerLID ? ServerLID ?
After the Subnet Manager runs SM Switch 7 → port 1 12 → port 2 42 → port 3 ServerLID 7 ServerLID 12 ServerLID 42
Before, nobody can talk to anybody. After, every server has an address and every switch knows where to send things.

So the Subnet Manager (SM for short) does the setup, roughly in this order.

  1. Explore. It sends special management packets out cable by cable to map every switch and HCA. These packets carry their own directions, like "out port 3, then port 17", so they work before any tables exist.
  2. Hand out addresses. Every port gets a LID.
  3. Plan routes. With the whole map in hand, it picks a path to every destination and spreads traffic evenly across the spines.
  4. Fill in every table, then switch the ports on.
  5. Keep watching. It re-checks the fabric regularly and reroutes around cables that die.

Why not let each switch figure things out alone, like Ethernet?

REASON 1

Better routes

Only someone who sees the whole map can spread traffic evenly over every spine. That even spread is what lets every GPU talk at full speed at the same time.

REASON 2

No gridlock

In a network that never drops packets, a bad set of routes can leave packets waiting on each other in a circle forever. Planning with the full map makes that easy to rule out.

REASON 3

Simple switches

All the thinking happens in one place, so the switches can stay dumb and fast.

What if the brain crashes? Traffic keeps flowing, because the switches keep their tables. The fabric just can't adapt to changes until a backup SM takes over, which is why real clusters run a standby.

Part 7

So what is UFM?

UFM (Unified Fabric Manager) is NVIDIA's software for running a big InfiniBand fabric. Think of it as the Subnet Manager plus a control room.

THE BRAIN

Runs the Subnet Manager

  • Hands out addresses
  • Plans routes
  • Fills in every switch table
THE CONTROL ROOM

Watches everything

  • A live map of every switch and cable
  • Health numbers per port, like errors and temperature
  • An alert log when a link flickers or degrades
  • Tools to switch off bad ports

On a big cluster that matters a lot. Instead of logging into hundreds of switches one by one, you deal with a single place.

Part 8

A real cluster

In June 2024 the AI company Imbue published From bare metal to a 70B model, a detailed write-up of bringing up their own training cluster from scratch. Here is roughly what it looked like.

4,088H100 GPUs
511servers, 8 GPUs each
400 Gb/sper GPU, each with its own HCA
320switches in 3 tiers

They describe InfiniBand as having "one brain for the entire network", which is the Subnet Manager from Part 6. A few of the problems they ran into make sense with the pieces above.

Part 9

Side by side

EthernetInfiniBand
Who decides routesEach switch, on its ownOne central Subnet Manager
When a buffer is fullDrops the packetSender waits for a credit
Who handles reliabilitySoftware (TCP) on the CPUThe HCA, in hardware
Designed forThe open internetOne cluster, one owner
There is also a middle path called RoCE (RDMA over Converged Ethernet). It runs InfiniBand-style RDMA over Ethernet switches, with extra settings to avoid drops. Some very large clusters use it.
Keep handy

Pocket glossary

Fabric
The whole InfiniBand network, all switches and cables together.
HCA
Host Channel Adapter. The smart network card.
LID
Local Identifier. A port's address on the fabric.
Forwarding table
A switch's lookup from destination LID to output port. Also called an LFT.
Credit
Permission to send one chunk, given by the receiver when it has buffer space.
Lossless
The network makes senders wait instead of dropping packets.
RDMA
Remote Direct Memory Access. One machine's card writes straight into another machine's memory without the CPUs.
GDR
GPUDirect RDMA. The same trick, but straight into GPU memory.
Fat tree
Leaves connect to every spine, so there are many equal paths between any two servers.
Subnet Manager
The brain. Assigns addresses and fills in every table.
UFM
NVIDIA's Subnet Manager plus monitoring, in one product.