Behind every large language model is a room full of specialized hardware that most software engineers never see directly — and the design of that room explains most of the cost and performance behavior of the models themselves. GPU choice sets memory and throughput ceilings, the interconnect decides how efficiently you can distribute a model across chips, and the storage layer determines whether your GPUs starve waiting for data or saturate their compute. Each of these is a first-class design problem.
This lesson covers the anatomy of a training cluster, the communication math that makes networking the deciding factor at scale, how storage tiers serve checkpoints and data loading, and the utilization economics that turn idle GPUs into your biggest line item. Whether you are capacity-planning a cloud allocation or just trying to understand your provider bill, these are the mechanics behind the numbers.
Anatomy of a training node
A modern GPU node is a tightly coupled system, not a bag of independent cards. Eight accelerators sit inside one chassis connected by NVLink at hundreds of gigabytes per second, while the outside world talks to them through PCIe and the network interface at a fraction of that speed. This asymmetry is the single most important structural fact in cluster design: communication inside a node is roughly an order of magnitude cheaper than communication between nodes, so every parallelism strategy tries to keep intensive exchanges local.
Each GPU needs host memory for data staging, fast local NVMe for checkpoint fragments, and a CPU with enough lanes to feed the accelerators without bottlenecking the loader. The node also carries the fabric adapter — InfiniBand or high-speed Ethernet with RDMA — that connects it to the leaf switches. Sizing the CPU and NVMe carefully matters more than people expect: a training run can be compute-saturated on the GPUs while still wasting minutes per hour on slow data loading and checkpoint writes.
| Component | Typical spec | Role | Rough cost |
|---|---|---|---|
| H100-class GPU | 80 GB HBM3, 3.35 TB/s | Training and inference | 40k each |
| A100-class GPU | 80 GB HBM2e, 2 TB/s | Training, budget inference | 18k each |
| NVLink | 900 GB/s bidirectional | Intra-node GPU fabric | Built into node |
| InfiniBand HDR/NDR | 400–400 Gbps per port | Inter-node allreduce | 2k per port |
| Parallel FS (Lustre/GPFS) | 100+ GB/s aggregate | Checkpoints, datasets | 0.30/GB/month |
| Node NVMe | 15–30 TB | Local scratch, fragments | $0.10/GB |
Modeling the cluster in code
Capacity planning is arithmetic you should be able to do on a whiteboard. The cluster model below tracks nodes, per-node GPU counts, and fabric bandwidth, then estimates aggregate memory, ring-allreduce time for a given gradient payload, and an hourly cost for the allocation. Running it against two candidate configurations answers most "buy or rent" questions faster than any spreadsheet.
from dataclasses import dataclass, field
from typing import Dict, List
@dataclass
class Node:
node_id: str
gpus: int
vram_gb_per_gpu: float
nvlink_gbps: float = 900.0
host_ram_gb: float = 2000.0
@dataclass
class Cluster:
name: str
nodes: List[Node] = field(default_factory=list)
fabric_gbps: float = 400.0
fabric_latency_us: float = 1.6
cost_per_gpu_hour: float = 2.4
@property
def total_gpus(self) -> int:
return sum(n.gpus for n in self.nodes)
@property
def aggregate_vram_tb(self) -> float:
return sum(n.gpus * n.vram_gb_per_gpu for n in self.nodes) / 1000
def allreduce_seconds(self, grad_gb: float) -> float:
n = self.total_gpus
if n <= 1:
return 0.0
transfer = 2 * (n - 1) / n * grad_gb * 1000 / self.fabric_gbps
latency = (n - 1) * self.fabric_latency_us / 1e6
return transfer + latency
def hourly_cost(self) -> float:
return self.total_gpus * self.cost_per_gpu_hour
def summary(self) -> Dict[str, float]:
return {
"gpus": self.total_gpus,
"vram_tb": round(self.aggregate_vram_tb, 2),
"allreduce_s_for_1gb": round(self.allreduce_seconds(1.0), 4),
"hourly_usd": round(self.hourly_cost(), 2),
}
eight_node = Cluster(
name="8x8 training pod",
nodes=[Node(f"n{i}", 8, 80.0) for i in range(8)],
fabric_gbps=400.0,
cost_per_gpu_hour=2.4,
)
print(eight_node.summary())
The allreduce estimate is deliberately simple, but it captures the shape of the problem: gradient synchronization cost grows with message size and degrades as more GPUs participate, which is exactly why scaling efficiency falls off a cliff when you spread a job too thin across a slow fabric.
Networking: the layer that decides scaling efficiency
Distributed training is dominated by collective operations — allreduce for gradients, allgather for sharded parameters, reduce-scatter during the backward pass of sharded training. Ring allreduce moves data through a logical ring of N ranks in two phases, and its cost scales with roughly twice the payload times (N−1)/N, plus latency that grows with the number of hops. The bandwidth term punishes large messages; the latency term punishes many small ones, which is why bucketing gradients before synchronization is standard practice.
Inside a node, NVLink carries these collectives at close to memory bandwidth, making intra-node sharding cheap. Across nodes, you want RDMA-capable InfiniBand or RoCE in a fat-tree topology with non-blocking bisection bandwidth — every link sized so half the cluster talking to the other half is not throttled. Commodity TCP Ethernet "works" for small jobs and falls apart for large ones, with packet loss and CPU overhead compounding under collective traffic.
The practical rule: measure your effective allreduce bandwidth with a benchmark before committing to a parallelism strategy. A configuration that assumes 350 Gbps and delivers 120 Gbps changes the optimal degree of tensor parallelism, and therefore the achievable model size, entirely.
Storage: feeding the data path and surviving checkpoints
Training clusters eat data. A run streaming raw tokens at high throughput needs a parallel file system — Lustre, GPFS, or a well-tuned object store with local NVMe caching — capable of sustaining aggregate read bandwidth in the tens of gigabytes per second. Network filesystems designed for home directories will throttle your GPUs to a crawl while charging you for idle accelerators.
Checkpoints are the other half of the story. A 70B model sharded across 64 GPUs produces checkpoint fragments that must be written atomically and read back quickly on resume. Rank-local NVMe staging followed by asynchronous upload to object storage is the standard pattern: the training step pauses only for the local write, and the slow object-store transfer proceeds in the background. Keep the last several checkpoints on fast storage, archive the rest, and treat resume time as a service-level objective — every minute a 512-GPU allocation spends waiting on a checkpoint is real money.
| Traffic pattern | Bandwidth need | Preferred tier | Failure mode if undersized |
|---|---|---|---|
| Dataset streaming | 20–80 GB/s | Parallel FS or NVMe cache | GPUs idle, utilization collapse |
| Checkpoint write | 5–30 GB/s burst | Node NVMe → object store | Long stalls, missed save windows |
| Checkpoint resume | 10–50 GB/s burst | Parallel FS | Slow recovery after failures |
| Evaluation corpus | 1–10 GB/s | Object store with cache | Eval queue backs up |
Inference clusters are a different animal
Training clusters optimize for throughput per dollar on a single synchronized job; inference clusters optimize for tail latency under a request distribution that never stops changing. That inversion changes the hardware calculus. Inference favors fewer, faster chips with high memory bandwidth for decode, replica counts sized to p95 latency rather than utilization, and request routing that batches compatible requests together without letting queueing delay dominate. A cluster provisioned like a training pod — few massive nodes, all synchronized — will serve inference expensively and unevenly.
The sizing model below translates a target service level into replica and concurrency decisions, which is the question capacity planners actually face.
from dataclasses import dataclass
@dataclass
class InferenceSizing:
peak_rps: float
p95_latency_s: float
avg_decode_s: float
target_utilization: float = 0.6
def replicas_for_slo(self) -> float:
seconds_per_replica = self.target_utilization * 1.0
rps_per_replica = seconds_per_replica / max(self.avg_decode_s, 1e-3)
return self.peak_rps / max(rps_per_replica, 1e-6)
def headroom_multiple(self) -> float:
return round(1.0 / self.target_utilization, 2)
def report(self) -> dict:
import math
needed = math.ceil(self.replicas_for_slo())
return {
"replicas": needed,
"headroom_x": self.headroom_multiple(),
"note": "sized for p95, not average utilization",
}
sizing = InferenceSizing(peak_rps=120.0, p95_latency_s=0.8, avg_decode_s=1.6)
print(sizing.report())
The headroom multiple is the number executives find uncomfortable and engineers find non-negotiable: running inference fleets at 95 percent utilization converts every traffic spike into a latency incident, so the economically "idle" capacity is actually what buys the service level. Continuous batching and speculative decoding change the arithmetic favorably, but they change the math, not the principle.
Utilization economics: the real cost driver
The headline price of a GPU is almost irrelevant compared with the price of an idle GPU. A cluster running at 40 percent utilization costs 2.5× more per useful GPU-hour than the same hardware at full tilt, and utilization losses come from recognizable places: data loading stalls, synchronization bubbles from uneven work, checkpoint pauses, and cluster fragmentation where partial allocations cannot admit new jobs.
Track four numbers continuously: GPU utilization and memory high-water marks per device, data-loader wait time, collective-operation time as a share of step time, and allocation utilization across the fleet. When step time regresses, those counters usually name the culprit within minutes. Idle-capacity accounting — knowing exactly how many GPU-hours went unused and why — is what turns infrastructure from a mysterious invoice into an engineering surface you can actually improve.
Common Mistakes
Buying inter-node networking as an afterthought
Fix: Fabric bandwidth sets your scaling ceiling; benchmark allreduce throughput before finalizing the design.
Serving training data from generic network storage
Fix: Use a parallel file system or NVMe cache sized for aggregate streaming bandwidth, not per-file latency.
Optimizing GPU selection while ignoring utilization
Fix: Raising utilization from 40 to 70 percent beats a hardware upgrade in cost per useful GPU-hour.
Synchronous checkpoint uploads from every rank
Fix: Stage locally and upload asynchronously so training pauses only for the local write.
Scaling a job across more nodes than its communication pattern justifies
Fix: Match parallelism degree to measured fabric performance; more GPUs can mean slower wall-clock time.
Best Practices
- Keep intensive collectives inside nodes through topology-aware placement whenever the model size allows it.
- Bucket gradients and parameters before collectives to trade many small messages for fewer large ones.
- Measure effective allreduce bandwidth and loader throughput on day one, then alert on regressions.
- Treat checkpoint resume time as an SLO and test it under simulated node failure.
- Report allocation utilization and idle GPU-hours weekly; visibility alone usually improves them.
Key Takeaways
- Intra-node NVLink is roughly an order of magnitude faster than inter-node fabric, so locality is the organizing principle of cluster design.
- Ring allreduce cost grows with gradient payload and rank count; bucketing and topology-aware placement are the standard mitigations.
- Parallel storage and NVMe checkpoint staging exist to keep accelerators fed — storage bottlenecks show up directly as idle GPUs.
- Utilization economics dominate hardware choice: cost per useful GPU-hour is the metric, not price per card.
- Continuously track utilization, loader waits, and collective time shares; they diagnose nearly every training throughput regression.