Reader companion · First Edition 2026 · GPUs · RDMA · NCCL · LLM serving
“Most of the expensive mistakes in operating an AI cluster come from misreading what a GPU is doing.” — Chapter 4
More: 🇫🇷 FR · 🇪🇸 ES · 🇯🇵 JP · 🇸🇬 SG · 🇦🇪 AE · ISBN: 979-8-1676-7954-2 (paperback) · 979-8-1676-7976-4 (hardcover)
Labs, 484 exercises with expected outputs, worked solutions, the full-length chapters and eight capstones: github.com/sbittla/network-compute-engineer-ai-infra
Every answer is grounded in the book’s chapters with specific section citations.
Choose an example question above, or type your own.
An AI cluster is a single machine spread across a building: GPUs, hosts, three networks, storage, power and cooling, and the schedulers and people that run them. When one layer misbehaves, every synchronous job pays for it. This book follows a request, a training step and a watt through every layer, and shows how to reason about each with numbers rather than dashboards.
Every chapter applies the same diagnostic loop: observe a symptom, collect evidence, trace the bottleneck across compute, network, storage and orchestration, find the root cause, make a safe change and validate it with repeatable measurements. Numbers are traced on ORION, an illustrative 256-GPU H100-class reference cluster, and every quantitative claim carries an evidence label: measured, modeled, simulated, illustrative, vendor specification or observed.
This concise edition keeps each chapter’s core mechanisms, key numbers, worked example, troubleshooting scenario and operating notes. The free companion repository holds the full-length chapters, a lab for every chapter, 484 exercises with expected outputs, worked solutions and marking schemes, single-machine hands-on labs and eight capstone projects.
Click the front matter, any chapter or appendix to see its opening, key takeaways and sections. Citation chips in answers scroll directly to the matching chapter.
Sections: About This Edition · How to Read This Book · Using the Practice Material
A 256-GPU training cluster and a 256-server web tier look alike but are different machines. The web tier’s servers are independent. A large training job turns the whole cluster into one synchronous computer that runs only as fast as its slowest GPU, network interface card (NIC), link, or storage target. An inference fleet sits in between: many independent requests, each served by a tightly coupled GPU group and…
Sections: Why AI infrastructure is different · Training and inference · Reference architectures · Scale-up and scale-out · Characterizing a workload · Utilization, failure, and economics · The employer and role landscape
A 256-GPU cluster is not a pile of servers; it is a building-scale machine. Its throughput is set not only by GPUs and fabrics but by how many kilowatts a rack feed can deliver, how many litres per minute of coolant reach each cold plate, how much a floor tile can carry, and which single component can stop every job at once. This chapter takes the ORION reference cluster apart from the GPU to the utility feed: we…
Sections: From a GPU to a building · The GPU server: where the watts go · Racks and the three networks · The power chain · Dynamic power, capping, and throttling · Cooling: moving heat out of the building · Facility interfaces and failure domains
A GPU server is still a Linux computer. Before a single CUDA kernel runs, the host has to read training data from disk or the network, place it in the right memory, copy it across PCI Express (PCIe), launch work on eight GPUs, service interrupts from ten network interface cards (NICs), and write checkpoints without stalling. When any of those steps is slow on one node, synchronous training makes the whole cluster…
Sections: Why the host still matters · The HX8 host as Linux sees it · CPU scheduling and frequency · Memory: placement, pinned buffers, and errors · Storage I/O · PCIe: link training, bandwidth, and errors · Interrupts, the network stack, and the kernel log · The first ten minutes, and a safe collector
Most of the expensive mistakes in operating an AI cluster come from misreading what a GPU is doing. A dashboard says “GPU utilization 97 %” while the job runs at half its expected speed; a training step slows by 30 % after an innocuous library upgrade; a kernel that “should” take 80 µs takes 280 µs. None of these can be diagnosed from the outside. This chapter gives you a working model of the GPU execution machine…
Sections: The GPU as a throughput machine · The execution model and latency hiding · The memory hierarchy · Launches, streams and synchronization · Occupancy: calculating it, and knowing when it matters · Tensor Cores, precision and batch size · Measuring: GPU-Util, DCGM and the profilers · Reading a timeline: five pathologies
Inside an 8-GPU server, bytes travel over NVLink and NVSwitch between GPUs, PCI Express (PCIe) between GPUs, network interface cards (NICs) and CPUs, and the inter-socket link. Which one a byte crosses depends on slots, cables, kernel options and how a job maps ranks to GPUs and NICs. Get it right and each GPU drives its own 400 Gb/s NIC through one PCIe switch; get one card or cable wrong and a large multi-node job…
Sections: Why topology is a performance and reliability problem · PCIe: the host’s packet network · NVLink and NVSwitch: the scale-up network · Data paths: GPU↔GPU and GPU↔NIC · Topology discovery and the mapping artifact · GPUDirect RDMA prerequisites: verify, never assume · Multi-rail assignment as a joint placement problem · A labelled model of aligned versus misaligned all-reduce
“It got 3 % faster” is the most expensive sentence in AI infrastructure when it is wrong. Teams ship changes on one before/after number, then chase a regression that was really a hot chassis or a different PyTorch build. This chapter is about knowing what a GPU should achieve, through arithmetic intensity, the roofline and honest utilization metrics, and proving what it does achieve, through benchmark protocols and…
Sections: Performance engineering as a discipline · Compute limits, memory limits and arithmetic intensity · The roofline model on ORION · Utilization metrics: MFU, HFU and the ones that mislead · Clocks, power and thermal state · Designing a benchmark protocol · Statistics without hand-waving
In a 256-GPU training job the slowest link sets the pace for every GPU. The network is built from ordinary data-center parts: Ethernet, Internet Protocol (IP) subnets, the Border Gateway Protocol (BGP), equal-cost multipath (ECMP) hashing and leaf-spine topologies. AI traffic stresses them as web traffic never does, with a few enormous, synchronized, low-entropy flows instead of millions of small ones. This chapter…
Sections: What AI traffic does to a data-center network · Routed to the host: Layer 2 and addressing · MTU, path MTU discovery and blackholes · Routing the fabric: eBGP in the data center · ECMP: how traffic is actually spread · Leaf-spine arithmetic and the rail-optimized topology · Failure behaviour and convergence
A 70-billion-parameter training step on ORION moves tens of gigabytes between GPUs every few seconds, and the step cannot finish until the slowest transfer does. TCP sockets spend CPU cycles, memory bandwidth and microseconds on every byte; at 400 Gb/s per network interface card (NIC) and eight NICs per node, that tax is unaffordable. Remote Direct Memory Access (RDMA) removes the kernel and the CPU from the data…
Sections: Why RDMA: the cost of moving a byte through a kernel · The verbs model · RoCEv2: the IBA transport over UDP/IP · InfiniBand: a fabric designed for RDMA · Transport behaviour: what happens when a packet goes missing · Path MTU and wire efficiency · Multi-rail design and the RoCEv2–InfiniBand choice · Tools and the evidence they give
An AI training job is only as fast as its slowest collective, and a collective is only as fast as its most congested queue. Remote direct memory access (RDMA) over Converged Ethernet version 2 (RoCEv2) fabrics make Ethernet “lossless” by combining priority flow control (PFC), which stops a sender before a buffer overflows, with Explicit Congestion Notification (ECN) and Data Center Quantized Congestion Notification…
Sections: Why AI fabrics care about congestion · Queues, buffers and where congestion lives · ECN: marking before it hurts · PFC mechanics and headroom · The risks of PFC · DCQCN: end-to-end congestion control · Incast arithmetic · Congestion telemetry: reading the signatures
A 256-GPU training job is only as fast as its worst link, and in an AI fabric the worst link is usually not congested. It is dirty, bent, mis-seated, mis-patched, or the wrong part. ORION’s backend has 512 links and 1,024 transceivers, each a 4-lane four-level pulse-amplitude modulation (PAM4) system that runs by design at a raw bit error ratio (BER) that needs forward error correction (FEC) to look perfect. This…
Sections: Why the physical layer dominates AI-fabric operations · Inside the switch ASIC · The NIC↔switch path, PAM4, and FEC · Transceivers and media · Link budgets and DOM · Error counters: physical or higher-layer? · Cleaning, cabling, commissioning, and spares
A 70-billion-parameter model needs about 1.1 TB of training state and roughly 1.8 × 10¹⁸ floating-point operations per optimizer step. No single GPU holds the first number or finishes the second in useful time, so the work is cut up across hundreds of GPUs, and every cut creates communication. Data, tensor, pipeline, context, and expert parallelism are five ways of cutting, each with its own traffic pattern and…
Sections: Anatomy of a training step · Memory accounting per GPU · Data parallelism · Tensor parallelism · Pipeline parallelism · Context and expert parallelism · Topology-aware placement · Scaling efficiency · Failure modes and a failure-aware workflow
Chapter 11 turned every parallelism strategy into a list of collectives: an all-reduce of gradients, a reduce-scatter and all-gather per layer, an all-to-all per mixture-ofexperts (MoE) layer. This chapter opens those boxes. A collective’s cost depends on message size, rank count, algorithm, protocol and topology. The NVIDIA Collective Communications Library (NCCL) chooses the algorithm and protocol at run time from…
Sections: From parallelism to collectives · The collectives · Cost models: alpha-beta for ring, tree, and friends · Reading nccl-tests: algbw, busbw, and the traps · Inside NCCL: topology, channels, algorithms, protocols · Rank mapping, rail alignment, and failure signatures
Chapter 11, Distributed Training Architecture, and Chapter 12, Collective Communication and NCCL, counted bytes and timed collectives. This chapter follows the bytes. A gradient chunk leaving GPU 3 on one ORION node crosses highbandwidth memory (HBM), a PCI Express (PCIe) switch, a network interface card (NIC), a rail leaf, possibly a spine, another NIC and another PCIe switch, and lands in another GPU’s HBM, with…
Sections: What actually moves in a training step · GPU-to-GPU inside a node: NVLink and peer-to-peer · GPU-to-NIC: PCIe, locality and GPUDirect RDMA · The end-to-end path and its copies · Locality and overlap · Stragglers and their amplification · “GPU utilization low while the network is busy” · Validating GPUDirect RDMA and locality
A 256-GPU training job reads its dataset continuously, writes a checkpoint of nearly a terabyte every few minutes, and, when something fails, must find, validate and load the last good checkpoint before 256 accelerators can work again. Whether the input pipeline is metadata- or bandwidth-bound decides the file format and worker count. Whether checkpoints are synchronous or asynchronous, local or remote, decides how…
Sections: Why storage decides cluster goodput · NVMe and the host↔storage path · Parallel file systems and object storage · Metadata-bound versus bandwidth-bound pipelines · Tail latency and measuring storage · Checkpoint anatomy and asynchronous saves · Atomic commit and restore validation · Recovery economics and the optimal interval
Serving runs millions of short, unpredictable jobs per day, each with a user waiting. A large language model (LLM) request has two phases with opposite hardware appetites: prefill processes the whole prompt in one compute-bound pass, and decode produces one token at a time, bound by memory bandwidth. Between them sits the key-value (KV) cache, a per-request allocation that grows with every token and usually decides…
Sections: Anatomy of an inference request · Prefill and decode: two different machines · The KV cache and the memory budget · Batching, paged KV and preemption · Queueing, Little’s law and phase SLOs · Choosing a replica layout · Disaggregated prefill and decode · Speculative decoding
A GPU cluster is not built once; it is built every day. Nodes arrive, get imaged, fail acceptance, get repaired, get upgraded in waves, fall off the bus at 3 a.m., and are eventually wiped and retired. Every transition is a chance to put a subtly broken machine into a 256-GPU job, where one throttling GPU silently taxes every other GPU in the job. This chapter treats the fleet as a system with a lifecycle, from…
Sections: The fleet as a system · Inventory, out-of-band control and provisioning · Node acceptance testing · Firmware and driver compatibility matrices · Staged upgrades: canary, waves and rollback · Repair, spares and decommissioning
A GPU cluster is only as productive as the decisions that put work onto it. ORION has 256 GPUs, but at any moment some are allocated, some sit on nodes draining for a firmware wave, some are carved into MIG (Multi-Instance GPU) slices, some are reserved for one tenant, and the free ones may be scattered in a way no 32-GPU training job can use. This chapter explains how Kubernetes and Slurm decide who runs and where,…
Sections: The scheduling problem on a GPU cluster · How a GPU becomes schedulable in Kubernetes · Sharing a GPU: MIG and time-slicing · Gangs, quotas, priority and fair share · Slurm for GPU training · Topology-aware placement on ORION · Kubernetes or Slurm?
A 256-GPU training job that runs 18 % slower for two hours does not crash, does not log an error, and does not trip a single classic infrastructure alert, yet it burns more accelerator time than most hard outages. AI clusters fail quietly: one hot link, one throttled GPU or one bad switch profile stretches every synchronous step for every rank. This chapter builds the observability system that catches those…
Sections: Why AI clusters defeat conventional monitoring · The telemetry stack · Signals that tell the truth · Prometheus for GPU fleets · SLIs and SLOs for AI infrastructure · Alerts: page on symptoms, using burn rates · Dashboards, incident command and postmortems
A 4,096-GPU training job built from components that each fail once every couple of months will still be interrupted every few hours. At that scale, failure is not an incident class; it is the operating environment. This chapter teaches how to walk from a hung rank to the exact GPU, host channel adapter (HCA) and switch port in minutes, quarantine the smallest defensible failure domain, and restart once from a…
Sections: Failure is the steady state · Fault domains, FMEA, and blast radius · GPU and host error taxonomy · Distributed failure signatures · The fast isolation workflow · Containment and recovery · Security and multi-tenant isolation
A GPU cluster is changed far more often than it is built: firmware bundles, quality-ofservice (QoS) profiles, kernel patches, maximum transmission unit (MTU) corrections, scheduler policy. At fleet scale those changes are made by automation, which is also the fastest way to take the whole cluster down: one wrong value in one template, applied in parallel, breaks all 256 of ORION’s GPUs in under a minute. This…
Sections: Why automation is the largest blast radius in the building · Idempotency, desired state, and reconciliation · Validation: catching the defect before any target is touched · CI/CD and GitOps · Staged rollout: canaries, waves, bake time, and abort conditions · Rollback and fleet-safety controls
“We have 1,024 GPUs” is the most expensive sentence in AI infrastructure planning. Some of those GPUs are not energized, some are in repair or held as spares, some sit in fragments too small for the jobs in the queue, and the ones that run spend part of their time waiting on the network or redoing lost work. This chapter turns nominal GPU counts into usable and useful capacity, forecasts when that capacity runs out…
Sections: What “utilization” means: four definitions · Nominal versus usable capacity · Demand forecasting and onboarding lead times · Total cost of ownership · Throughput per dollar and per watt: comparing designs · The facility envelope: power, cooling, and transients · Power capping and workload/facility coordination
A distributed training job is one synchronous machine built from GPUs, hosts, PCI Express (PCIe) switches, network interface cards (NICs), a backend fabric, storage, a scheduler and software. When its step time regresses, the cause can sit in any layer, and production rarely offers one clean change to blame: driver upgrades, placement policies, storage moves and container rebuilds land in the same window while…
Sections: Why cross-layer regressions are hard · Evidence by layer · From symptom to a ranked hypothesis tree · Natural experiments and attribution · Scaling-efficiency analysis · Benchmark design and evidence-based tuning · Anti-patterns and the before/after report
Real work arrives as “design the next cluster”, “prove this one is ready”, or “tell us why it is slower than the plan said”. This chapter is a guide to running that kind of project end to end, from framing and decisions through arithmetic, failure domains, honest evidence and a safe failure exercise to a design review and a backlog. A worked mini-capstone on the ORION reference cluster ties Chapters 1–22 together.
Sections: What a capstone is for · Framing the problem and the assumptions register · Architecture as a set of decisions · Consistency arithmetic · Failure-domain analysis · Design review, benchmark evidence and the failure exercise · Presentation and the next-step backlog
This chapter turns the book’s knowledge into a career you can prove. AIinfrastructure roles are new, titles are inconsistent, and interviews probe across layers, so a network engineer is asked about NVIDIA Collective Communications Library (NCCL) rings and a platform engineer about remote direct memory access (RDMA) over Converged Ethernet (RoCE) congestion. We map six roles to competencies, define…
Sections: What the job actually is · Competency maps for six roles · Levels: junior to principal by observable behaviour · The employer landscape, and how not to fool yourself about it · System-design interviews · Case studies, portfolio and engineering practice
ORION is the book’s running example: a 256-GPU training and inference cluster operated by Halcyon AI, a fictional company. ORION is an illustrative, H100class teaching reference, not a measured system. Nobody built it and nothing in this appendix was measured on it. Every value is [ILLUSTRATIVE] unless it carries another label. Values that approximate a public vendor specification are marked [VENDOR-SPEC, 2026-10]…
Sections: A.1 The HX8 node · A.2 The ORION-256 cluster · A.3 Reference workloads · A.4 The ORION-XL variant · A.5 Reading the evidence labels
A performance number without its conditions is a rumour. This appendix collects, in one place, the benchmark discipline that Chapter 6 (GPU Performance Engineering), Chapter 12 (Collective Communication and NCCL), Chapter 15 (LLM Inference and Serving Infrastructure) and Chapter 22 (Cross-Layer Performance Engineering) apply to their own measurements, and that the companion repository’s lab standards require of…
Sections: B.1 The minimum report · B.2 Extra fields for distributed training · B.3 Extra fields for inference · B.4 Report template
Use this checklist before a cluster, a new block of nodes or a major upgrade goes into service, and again after any change that touches several layers. Each row is a concrete check, the criterion that counts as a pass, and (under “Ch.”) the chapters that teach the mechanism behind it. The pass criteria are ORION’s and are [ILLUSTRATIVE] unless marked otherwise: derive your own thresholds from known-good nodes,…
Sections: C.1 Facility · C.2 Host · C.3 GPU · C.4 Network and RDMA · C.5 Storage and checkpointing · C.6 Scheduling · C.7 Observability · C.8 Reliability and security · C.9 Change management · C.10 Cost and capacity
Terms and acronyms used in the chapters, defined as the chapters use them. Numbers in the definitions are ORION’s reference values and carry their evidence labels; Appendix A has the full reference configuration. The chapter that introduces a term gives its mechanism, its numbers and its caveats. 1F1B — One-forward-one-backward: a pipeline schedule that alternates forward and backward micro-batches, so stage 0 holds…
Sections: Glossary
Claim Ch. Applies to Source Dense BF16 ≈ 989 TFLOP/s, dense FP8 ≈ 1,979 TFLOP/s (the datasheet’s 1,979 / 3,958 are with sparsity) 4, 6, 11, H100 SXM NVIDIA H100 Tensor Core GPU 2026-10-30 (product page and datasheet) [1]
Sections: E.1 GPU hardware · E.2 NVIDIA driver, nvidia-smi, CUDA and GPUDirect · E.3 DCGM and dcgm-exporter · E.4 NCCL and nccl-tests · E.5 PyTorch and Megatron-LM · E.6 vLLM · E.7 Kubernetes and the NVIDIA GPU Operator · E.8 Kueue · E.9 Slurm · E.10 Host, PCIe and RDMA · E.11 Ethernet, routing and optics · E.12 Storage · E.13 Profiling, GPU sharing, container security and routing · E.14 Unverified claims · Further Reading · About the Author
Engineers who design, build or run the infrastructure under AI workloads: GPU and compute engineers, network engineers, ML and training engineers, site reliability and operations engineers, and infrastructure architects. The book is written to be read in order, but "How to Read This Book" gives a reading path for each of those roles and a plan for a reader who has one week to become useful.
No. Labs come in three tiers. Level 1 runs on a laptop (or on paper) and is enough to complete the whole course. Level 2 extensions run the same method on one real GPU host, with a CPU fallback, and Level 3 extensions need several GPU nodes on an RDMA fabric. The higher tiers turn modeled numbers into measured ones.
ORION is the book's running example: an illustrative 256-GPU, H100-class training and inference cluster operated by a fictional company, Halcyon AI. It is a teaching reference, not a measured system or a product recommendation, so numbers can be traced from one layer to the next. Appendix A gives its full reference configuration.
The concise edition condenses the full edition's 24 chapters to about a third of their length, keeping each chapter's core mechanisms, key numbers, worked example, troubleshooting scenario and operating notes. The free companion repository at github.com/sbittla/network-compute-engineer-ai-infra holds the full-length text of every chapter alongside the labs and exercises.
A lab for every chapter with a checker that reports which parts pass, 484 exercises with expected outputs, worked solutions and marking schemes, single-machine hands-on labs that use real tools and counters, and eight capstone projects. Exercise types include knowledge checks, worked problems on ORION, troubleshooting, design challenges and reflection.
Every quantitative claim carries an evidence label: MEASURED, MODELED, SIMULATED, ILLUSTRATIVE, VENDOR-SPEC with the month it was checked, or OBSERVED with a date. Vendor-specific details are treated as version-sensitive, and Appendix E lists the sources and version-sensitive claims. Appendix B sets out a benchmark reporting standard.
On Amazon worldwide in paperback (ISBN 979-8-1676-7954-2) and hardcover (ISBN 979-8-1676-7976-4). The store picker on this page links to your local Amazon store.