What Is a GPU Interconnect? Trace Data Paths to Find Bottlenecks
A GPU interconnect is not one cable or standard; it is the route data actually takes among a GPU, CPU, memory, other GPUs, and network devices. To find a bottleneck, trace the segments between a workload’s source and destination, then measure the same direction and kind of transfer instead of comparing peak link rates alone.
What Is a GPU Interconnect? Trace Data Paths to Find Bottlenecks
A GPU interconnect is not one cable or standard; it is the route data actually takes among a GPU, CPU, memory, other GPUs, and network devices. To find a bottleneck, trace the segments between a workload’s source and destination, then measure the same direction and kind of transfer instead of comparing peak link rates alone.
Follow the data path, not just the component names
Training input may travel from storage or a network into host memory and then cross PCI Express (PCIe) into GPU memory. When several GPUs share a model, tensors may move between them over PCIe or a GPU link such as NVLink. Communication across servers also includes a network adapter and Ethernet or InfiniBand. Inside a package, the compute die, high-bandwidth memory, and chiplets may use shorter package-level connections. One workload does not necessarily traverse every segment.
Storage/network → host memory → PCIe root/switch → GPU 0 memory
↕ PCIe P2P or NVLink fabric
GPU 1 memory
↕ when GPU Direct RDMA is supported
NIC → inter-node network
Inside a GPU package: compute die ↔ package links ↔ HBM/other dies (product-specific)| Layer | Typical endpoints | First question to ask |
|---|---|---|
| Inside the package | Compute dies, chiplets, HBM | How does this product connect its memory and dies? |
| PCIe | CPU/memory hierarchy and GPUs, NICs, or NVMe | What are the link generation, width, and bridge path? |
| GPU-to-GPU | GPU memory and communication | Can this pair use P2P, and does the workload use it? |
| Network between nodes | NICs and GPUs in different servers | Does GPU data pass through the host, or can a supported direct path be used? |
These layers do not replace one another. A system with NVLink may still use PCIe to move input from the host to a GPU. GPU-to-GPU P2P may also work over PCIe on some platforms, so the absence of NVLink alone does not prove that direct access is impossible. CUDA provides cudaDeviceCanAccessPeer() to query whether a device pair supports P2P and an API to enable access for supported pairs; details depend on the platform and topology. CUDA Programming Guide: multi-GPU systems
How does a topology report summarize the route?
On Linux or Windows systems with NVIDIA GPUs, nvidia-smi topo -m shows a connection matrix for GPUs and NICs along with CPU and memory affinity for GPUs. It summarizes relative paths through PCIe bridges and NVLink; it is not a cable diagram or a bandwidth measurement. NVIDIA documents nvidia-smi topo -mp as a PCI-only view that excludes NVLink. NVIDIA SMI topology commands
| Label | Meaning |
|---|---|
X | The same device |
PIX | Traverses one PCIe switch |
PXB | Traverses multiple PCIe switches without a host bridge |
PHB | Traverses a PCIe host bridge, typically in the CPU |
NODE | Also crosses PCIe host bridges within one NUMA node |
SYS | Also crosses the system interconnect between NUMA nodes |
NV# | A path using a bonded set of # NVLinks |
A longer-looking path is not automatically slower, and NV# does not guarantee application performance. Read GPU-to-NIC relationships and CPU/memory affinity together, then verify with a transfer. Check pairwise capability with nvidia-smi topo -p2p p for PCIe P2P and nvidia-smi topo -p2p n for NVLink P2P. OK means the capability is available; it does not show that an application uses the path or achieves a target bandwidth. Some kernel configurations may require administrator privileges to display topology.
Compare NUMA placement with nvidia-smi topo -cpu or the affinity columns in nvidia-smi topo -m. Placing CPU threads and input memory near a GPU’s socket may reduce cross-socket traffic, but no fixed placement is best for every workload. Account for operating-system CPU limits, scheduler policy, and shared devices too.
Isolate the bottleneck with matching transfers
A GPU-to-GPU P2P copy follows a different route from a host-to-GPU transfer. Write down whether one training iteration moves input from host memory to GPU 0, exchanges intermediate tensors between GPU 0 and GPU 1, or sends results to another server. This makes clear which segment to measure first. The example below is a diagnostic procedure, not a claim that the hardware was tested.
Describe the workload’s transfers. Record source and destination, direction, size, frequency, and how many GPUs communicate at once. Latency for small messages and throughput for large messages are different measures.
Record the topology. Use
nvidia-smi topo -mfor GPU, NIC, CPU, and memory affinity. If GPU-pair P2P matters, also savenvidia-smi topo -p2p pandnvidia-smi topo -p2p n. Where supported,dcgmi topo --gpuid 0adds connection details for one GPU.Measure only the relevant segment. NVIDIA
nvbandwidthmeasures several copy patterns, including GPU-to-GPU and host-to-GPU. Its official repository primarily documents Linux and lists CUDA Toolkit, a C++17 compiler, and CMake as single-node build requirements. After building it, run./nvbandwidth -lto list test names. For example, choose a matching prefix and output format with./nvbandwidth -p device_to_device --format json. Use the installed version’s-loutput to select an available test. NVIDIA nvbandwidth usagegit clone https://github.com/NVIDIA/nvbandwidth.git cd nvbandwidth cmake . make ./nvbandwidth -l ./nvbandwidth -p device_to_device --format json
Compare application metrics. If an NCCL collective is slow, compare a measurement that reflects its message sizes and GPU count with waiting time in the actual training job. NCCL recommends checking
nvidia-smi topo -m, P2P capability, andnvbandwidthfor intra-node paths first; if path measurements meet expectations but NCCL does not, investigate NCCL configuration. NCCL performance troubleshootingChange one setting only after identifying a cause. Check NUMA placement, concurrent transfers, framework communication mode, NIC path, and link state. Repeat the same measurement before and after the change. If results do not improve, revert and inspect the next segment so simultaneous changes do not obscure the cause.
A single-node nvbandwidth result describes a selected copy pattern; it is not a substitute for end-to-end model performance. A P2P capability matrix is not a throughput benchmark either. NCCL explicitly distinguishes checking whether P2P is available from measuring GPU-to-GPU bandwidth and recommends nvbandwidth for the latter. NCCL GPU troubleshooting
What should you check when a result is low?
First separate a slowdown on one transfer from one that appears only when several devices communicate at once. If one GPU pair is slow, inspect that pair’s topology and P2P capability, then measure the same pair and direction. If GPU-to-NIC or host-to-GPU traffic is slow, check the NIC’s route, CPU/memory affinity, and competing PCIe traffic. Do not compare results as if they were equivalent when message size, direction, or test conditions differ.
| Symptom | Segment to isolate first | Next check |
|---|---|---|
| Only host↔GPU copies are slow | Host memory, CPU affinity, PCIe | Is memory near the GPU’s NUMA node? Are devices sharing the link? |
| One GPU pair has low P2P throughput | That pair’s PCIe/NVLink route | Compare its P2P matrix entry with nvbandwidth for the same pair and direction |
| Pairwise results are fine, but concurrent traffic falls | Shared switch, uplink, or fabric | Look for contention that appears only when pairs run together |
| Link results meet expectations, but training/NCCL is slow | Collective or application layer | Check message size, GPU count, communication overlap, and NCCL configuration |
On bare-metal Linux, PCIe P2P can be affected by IOMMU and PCI Access Control Services (ACS). CUDA explains that ACS can redirect peer traffic through the CPU root complex and affect performance; NCCL also describes IOMMU conditions to check when P2P behaves unexpectedly. These checks may require system-level changes, so follow the server’s operating guidance and NVIDIA documentation rather than changing BIOS or kernel settings blindly. Preserve a baseline and a rollback path before any change. CUDA P2P and ACS details, NCCL GPU troubleshooting
Interconnect diagnosis starts with “where does this workload’s data start, which segments does it cross, and where does it arrive?” Matching topology, P2P capability, segment measurements, and application metrics lets you narrow a bottleneck without mistaking a link specification for real workload performance.
References
[NVIDIA SMI Documentation: Topology](https://docs.nvidia.com/deploy/nvidia-smi/index.html#topology)
[NVIDIA CUDA Programming Guide: Multi-GPU Systems](https://docs.nvidia.com/cuda/cuda-programming-guide/03-advanced/multi-gpu-systems.html)
[NVIDIA CUDA Programming Guide: P2P, IOMMU, and ACS](https://docs.nvidia.com/cuda/cuda-programming-guide/03-advanced/multi-gpu-systems.html#host-iommu-hardware-pci-access-control-services-and-vms)
[NVIDIA nvbandwidth: README and usage](https://github.com/NVIDIA/nvbandwidth/blob/main/README.md)
[NVIDIA NCCL: GPU troubleshooting](https://docs.nvidia.com/deeplearning/nccl/archives/nccl_2326/user-guide/docs/troubleshooting/gpu_troubleshooting.html)
[NVIDIA NCCL: Performance and tuning](https://docs.nvidia.com/deeplearning/nccl/archives/nccl_2326/user-guide/docs/troubleshooting/performance_and_tuning.html)
[NVIDIA DCGM Documentation: Topology and NVLink](https://docs.nvidia.com/datacenter/dcgm/latest/learn/core-services/topology-and-links.html)