GPUDirect Storage Explained: NVMe to GPU Memory Directly
NVIDIA GPUDirect Storage moves data between NVMe or network storage and GPU memory without a CPU bounce buffer. How it works, cuFile, and the PCIe layout it needs.
The short answer
GPUDirect Storage (GDS) is NVIDIA technology that lets data move straight between storage and GPU memory. In NVIDIA's words it "enables a direct data path for direct memory access (DMA) transfers between GPU memory and storage, which avoids a bounce buffer through the CPU". Without it, data read from an NVMe drive or a network file system lands in CPU memory first and is then copied to the GPU. With it, a DMA engine near the drive or network adapter writes into GPU memory directly. Applications use it through NVIDIA's cuFile API. The hardware that matters most is how your GPUs, NVMe drives and network adapters sit on the server's PCIe switches.
Browse NVMe server SSDs, ConnectX network adapters and server GPUs.
The problem GDS solves
In a standard server, reading training data into a GPU takes two hops. The storage driver DMAs the data from the NVMe drive, or from the network adapter for remote storage, into a buffer in CPU memory. Then a second copy moves it from that buffer into GPU memory. NVIDIA calls that intermediate buffer the bounce buffer.
NVIDIA's GDS design guide lists what that detour costs:
- Bandwidth. "The PCIe bandwidth into and out of a CPU may be lower than the bandwidth capabilities of the GPUs." GPUs, NICs and storage devices "sitting under a common PCIe switch will typically have higher PCIe bandwidth between them".
- CPU work and memory. CPU bounce buffers have to be allocated and managed.
- Latency. Every extra copy adds time.
GDS removes the second hop. NVIDIA describes it as enabling "a direct memory access (DMA) engine near the NIC or storage to move data on a direct path into or out of GPU memory — all without burdening the CPU."
GDS and GPUDirect RDMA
GDS is one member of NVIDIA's GPUDirect family. GPUDirect Peer to Peer moves data between the memory of two GPUs, and GPUDirect RDMA gives a direct DMA path between a network adapter and GPU memory. GDS extends the idea to storage, both local NVMe and remote storage reached over the network, such as NVMe over Fabrics (NVMe-oF). For remote storage, the data arrives through an RDMA-capable network adapter.
If you are building the network side, our guides to NVMe-oF transports and RoCE and RDMA adapters cover it.
PCIe topology decides the result
GDS only helps as much as the server's PCIe layout allows. NVIDIA's design guide uses the DGX-2 as its example: two levels of PCIe switches, with NVMe drives on the first level ("up to four drives per PCIe tree") and slots for NICs or RAID cards on the second level, next to the GPUs. On that PCIe Gen 3 system, NVIDIA's engineers report:
- 13.3 GB/s from a set of four NVMe drives in a 2×2 RAID 0 configuration;
- 11 GB/s from a NIC, and 14 GB/s from a RAID card, in the second-level slots;
- that the local and remote paths "can be used simultaneously, and importantly, bandwidth is additive across the system".
NVIDIA also notes that "using RAID 0 on the control path via the CPU does not impede a direct data path." Striped local NVMe and GDS work together.
The practical rule from NVIDIA's configuration guide: pair each GPU with the NVMe drives and network adapter that share its PCIe switch. It shows how to read the topology with lspci and nvidia-smi topo, and notes that "the optimal path between a GPU and NIC will be one PCIe switch path", which nvidia-smi reports as PIX. When you choose a GPU server, look at its block diagram: which slots and drive bays sit under which PCIe switch matters as much as how many there are.
The software side: cuFile and compatibility mode
Applications do not get GDS by accident. They call NVIDIA's cuFile API, for example cuFileRead and cuFileWrite on a registered GPU buffer. NVIDIA's documentation describes cuFile as the API "used in applications and frameworks to leverage GDS technology".
cuFile also has a compatibility mode. When the direct path is not available, it falls back to standard POSIX reads and writes into host memory and copies the data to the GPU. NVIDIA lists the cases where that happens, including:
- the nvidia-fs kernel driver is not loaded;
- the Linux distribution or file system does not support GDS;
- the network links are not enabled with RDMA;
- the configuration "is not optimal for GPUDirect Storage".
An application written for cuFile still runs on a server without GDS support; it just does not get the direct path. When you test GDS, confirm the I/O is actually taking the direct path rather than falling back.
What you need to run GDS
- GPUs, driver and software supported by NVIDIA's GDS release. Check NVIDIA's GDS documentation for the current support matrix before you buy.
- NVMe drives for local storage, ideally sharing PCIe switches with the GPUs that read from them.
- RDMA-capable network adapters (InfiniBand or RoCE Ethernet) for remote storage, again close to the GPUs on the PCIe tree.
- A supported file system or storage stack. NVIDIA's configuration options name Lustre, WekaFS and IBM Spectrum Scale among the file systems with GDS-specific settings.
Where GDS fits in an AI storage design
GDS speeds up the path from the storage tiers into the GPUs; it does not replace the tiers. Local NVMe cache, a shared high-performance file system and a capacity tier on hard drives are still needed. Our guide to AI storage tiers explains how they fit together.
Hardware from our catalog
- NVMe: Micron 9300 MAX 6.4TB U.2, Micron 7450 PRO 3.84TB, Micron 9400 PRO 7.68TB U.3
- RDMA adapters: ConnectX-6 HDR VPI (CN9K2), ConnectX-5 100GbE dual-port (CX516A), HPE 100GbE MCX623106AS (P25961-B21)
- GPUs and systems: NVIDIA A100 80GB PCIe, Supermicro SYS-821GE-TNHR HGX H100/H200 8-GPU system
Check each part against NVIDIA's GDS support documentation for your software version. For help matching drives and adapters to a GPU server's PCIe layout, send the server model through request a quote.
Warranty and condition
Every listing states its condition. New parts carry the manufacturer's warranty where the listing states it; refurbished parts carry our 90-day advance replacement warranty.