NVIDIA/nvbandwidth

A tool for bandwidth measurements on NVIDIA GPUs.

What it solves

nvbandwidth helps you measure the actual memory copy bandwidth your NVIDIA GPUs can achieve, rather than relying on theoretical peak numbers. It runs a series of copy tests across different memory paths (host-to-device, device-to-host, device-to-device) using either the copy engine or streaming multiprocessor kernels. This gives you real-world throughput numbers that can reveal bottlenecks and guide performance tuning.

How it works

nvbandwidth is a command-line tool built with CUDA. It executes a set of test cases that copy data between buffers using either the copy engine (via memcpy APIs) or streaming multiprocessor kernels. Each test measures the time taken for a series of copies, then computes bandwidth as bytes per second. For latency, it uses a pointer-chasing technique that follows a random linked list to prevent cache effects. The tool can run on a single GPU or across multiple nodes using MPI and NVIDIA's IMEX service. Results are shown as matrices of bandwidth values, and can be output as text, JSON, or perf format.

Who it’s for

This is aimed at developers, system administrators, and researchers working with NVIDIA GPUs—especially multi-GPU or multi-node systems—who need to measure interconnect bandwidth (like NVLink or PCIe) for capacity planning, workload placement, or performance validation. It requires a Linux environment (Windows is possible with extra setup), CUDA Toolkit 11+, a C++17 compiler, and CMake.

Highlights

  • Supports both copy engine (CE) and streaming multiprocessor (SM) copy methods
  • Measures unidirectional and bidirectional bandwidth across host and device links
  • Includes pointer-chasing latency measurements that avoid cache and TLB interference
  • Works in single-node and multinode (MPI + IMEX) configurations
  • Provides pairwise testing with GPU UUIDs to isolate specific links
  • Offers pair sampling for large clusters to reduce test time while covering all GPUs
  • Output formats: plain text, JSON, or perf
  • Adjustable buffer size and iteration count, with median or mean reporting

Related

  • Project
  • Project
  • Project
  • Project
  • Project