Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Integrating GPUs, Networking & Storage with Open Standards

· 6 min read · Home Networking

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Integrating GPUs, high-speed networking, and storage using open hardware standards lets you build a flexible, vendor-neutral AI or HPC cluster without proprietary lock-in. This approach uses standards like CXL (Compute Express Link), NVMe over Fabrics (NVMe-oF), and the OCP (Open Compute Project) specifications to create a unified, composable infrastructure. Before you start, ensure your hardware supports these standards — most modern server CPUs (Intel Xeon Scalable, AMD EPYC) and GPUs (NVIDIA, AMD) have some support, but check your specific models. You'll also need a solid understanding of PCIe topology and Linux system administration.

What You'll Need

  • Servers with PCIe Gen4 or Gen5 slots (for GPUs and NICs)
  • GPUs that support CXL or at least PCIe peer-to-peer (e.g., NVIDIA A100/H100, AMD Instinct)
  • NVMe SSDs (preferably with NVMe-oF support)
  • High-speed network adapters (25/100/200 GbE or InfiniBand) that support RDMA (RoCE or InfiniBand)
  • An NVMe-oF target (another server or a dedicated storage box) with RDMA-capable NICs
  • Linux OS (Ubuntu Server 22.04+ or similar) with kernel 5.15+ for CXL support
  • Open-source tools: nvme-cli, rdma-core, and a CXL management library (e.g., libcxl)
  • A switch that supports RoCE or InfiniBand if you need to scale beyond a single link
  • Basic knowledge of PCIe enumeration (lspci) and network configuration (ip, ifconfig)

Step-by-Step

  1. Verify hardware support. Run lspci -v to confirm your GPUs, NICs, and NVMe drives are detected. Check that your CPU and motherboard support CXL (look for "CXL" in the BIOS/EFI settings). If not, you may still use PCIe peer-to-peer for GPU-to-storage, but CXL gives more flexibility.
  2. Update firmware and BIOS. Ensure your system BIOS is up to date to enable CXL and PCIe bifurcation (splitting a x16 slot into multiple x8 or x4). Enable SR-IOV (Single Root I/O Virtualization) if you plan to virtualize.
  3. Install required software. On all nodes, install: sudo apt install nvme-cli rdma-core libibverbs1 ibverbs-providers (or equivalent for your distro). For CXL, install the cxl-cli tool from the libcxl package.
  4. Configure network for RDMA. Set up your NICs with IP addresses and enable RDMA. For RoCE (RDMA over Converged Ethernet), ensure your switch supports PFC (Priority Flow Control) and ECN (Explicit Congestion Notification). Use rdma link show to verify the RDMA link is active.
  5. Set up NVMe-oF target. On the storage server, create an NVMe subsystem: nvme nvmeof-create -t rdma -s -a . Then add a namespace pointing to your NVMe drive: nvme nvmeof-add-ns -s -n -d /dev/nvme0n1.
  6. Connect the initiator. On the GPU server, discover the target: nvme discover -t rdma -a -p 4420. Then connect: nvme connect -t rdma -n -a -p 4420. You should see a new /dev/nvmeX device.
  7. Enable GPU peer-to-peer (P2P) over PCIe. For direct GPU-to-storage access, use CUDA's cudaMemcpyPeer or the nvidia-smi tool to check P2P capability. In your application, use GPUDirect Storage (GDS) if using NVIDIA GPUs — this requires installing the NVIDIA GDS driver and mounting the NVMe-oF device with the GDS filesystem.
  8. Configure CXL memory pooling (optional). If your hardware supports CXL, use the cxl command to create a memory device: cxl create-region -d decoder0 -w 0 -s 256G. Then attach it to a host. This allows GPUs and CPUs to share memory resources dynamically.
  9. Test the setup. Run a simple benchmark like fio to test storage throughput over the network. For GPU-to-storage, use a CUDA sample that reads/writes files directly to the NVMe-oF device. Verify that the bandwidth is close to the network line rate.
  10. Monitor and tune. Use nvme list to check connections, rdma statistic for packet loss, and cxl list for memory regions. Adjust MTU (9000 for jumbo frames) and queue depths as needed.

Common Mistakes

  • Forgetting to enable PFC on the switch — RoCE will not work reliably without it, causing packet loss and timeouts.
  • Using a NIC that doesn't support RDMA (many consumer NICs don't). Always check for rdma link show output.
  • Not updating the kernel to a version with CXL support — older kernels (pre-5.12) lack proper CXL drivers.
  • Setting up NVMe-oF with TCP instead of RDMA — TCP works but has higher latency and CPU overhead.
  • Ignoring PCIe bifurcation — if your motherboard splits slots incorrectly, the GPU may run at x8 instead of x16, reducing bandwidth.
  • Forgetting to mount the NVMe-oF device with the correct filesystem (e.g., ext4 or XFS) — GDS requires a specific filesystem setup.

Tips

  • Start with a single GPU and one NVMe drive to validate the setup before scaling.
  • Use jumbo frames (MTU 9000) on all network interfaces to reduce overhead.
  • For production, consider using a dedicated storage server with multiple NICs to avoid bottlenecking.
  • Keep all nodes on the same subnet to simplify RDMA configuration.
  • Use the OCP (Open Compute Project) specifications for rack design — they define standard mounting and cooling for GPU servers.
  • Document your PCIe topology (which GPU is in which slot) — this helps with debugging and resource allocation.

Troubleshooting

  • RDMA link is down: Check dmesg for errors, ensure the NIC driver is loaded, and verify switch configuration. Try disabling PFC temporarily to see if it's a flow-control issue.
  • NVMe-oF connection fails: Confirm the target is listening (ss -tlnp | grep 4420). Check firewall rules — open port 4420 on both sides. Also ensure the NQN (NVMe Qualified Name) is correct.
  • GPU cannot access the NVMe device: Ensure the NVMe device is visible in lspci and that the driver is loaded. For GDS, check that the GDS driver is installed and the filesystem is mounted with the gds option.
  • Performance is low: Check network speed with iperf3 (if using TCP) or ib_write_bw for InfiniBand. Verify that the NVMe drive is not the bottleneck — test local NVMe speed first. Also check PCIe link speed with lspci -vv | grep LnkSta.
  • CXL device not recognized: Run dmesg | grep cxl to see if the driver loaded. Update the kernel and ensure the BIOS has CXL enabled. Some motherboards require a separate CXL switch card.

Frequently Asked Questions

What is the difference between NVMe-oF and NVMe over TCP?

NVMe-oF (NVMe over Fabrics) is a general term for accessing NVMe drives over a network. It can use RDMA (RoCE or InfiniBand) for low latency, or TCP for standard Ethernet. RDMA is preferred for GPU workloads because it offloads network processing from the CPU.

Can I use InfiniBand instead of RoCE?

Yes, InfiniBand is another RDMA fabric that works well with NVMe-oF and GPU direct storage. It requires InfiniBand NICs and a switch, which are more expensive than Ethernet but offer lower latency.

Does CXL replace PCIe?

No, CXL is built on top of PCIe physical layer. It adds cache-coherent memory sharing between devices, but PCIe remains the base for data transfer. CXL devices use the same slots as PCIe.

Do I need a special switch for RoCE?

Yes, a standard Ethernet switch may not support PFC and ECN, which are essential for RoCE to avoid packet loss. Look for switches that explicitly state RoCE support.

Can I use this setup with consumer GPUs?

Consumer GPUs (e.g., GeForce) do not support GPUDirect Storage or peer-to-peer over PCIe as well as data-center GPUs. They also lack the necessary drivers. For production, use data-center GPUs (e.g., NVIDIA A100, AMD Instinct).

Is this configuration safe for production?

Yes, when properly configured with redundancy and monitoring, it is used in many data centers. However, always test in a lab first and ensure you have proper cooling and power for the added hardware.