NBD-VRAM is a new open-source project that enables NVIDIA GPU VRAM to function as swap space on Linux without requiring kernel modules. The tool uses a clever architecture combining CUDA driver APIs and the kernel's built-in NBD (Network Block Device) protocol to expose GPU memory as a standard block device.
Architecture Avoids Kernel Module Dependency
The system works through a three-layer approach:
- A daemon allocates VRAM through the CUDA driver API
- It serves this allocated memory as a block device via NBD protocol over a Unix socket
- The kernel's built-in NBD driver connects and exposes /dev/nbdX as a normal swap device
This creates a memory hierarchy: RAM → VRAM (PCIe) → zram (compressed) → SSD. The architecture deliberately avoids NVIDIA's P2P API because consumer GPUs return errors when attempting direct BAR1 memory mapping. Instead, NBD-VRAM uses standard CUDA memory copy functions that work universally across consumer RTX and GTX cards.
Performance Reaches 1.3 GB/s on Consumer Hardware
Testing on an RTX 3070 Laptop yielded measurable performance characteristics:
- Sequential throughput: Approximately 1.3 GB/s
- Speed advantage: Faster than NVMe storage since data travels through PCIe rather than storage subsystems
- Memory expansion: With 16GB physical RAM + 7GB VRAM swap + zram + SSD, total addressable memory reached approximately 46GB (3x increase)
Target Users Are Laptop Owners With Soldered Memory
The project specifically addresses a pain point for laptop users with soldered memory and no upgrade path who have unused VRAM capacity. Requirements include:
- NVIDIA GPU with CUDA support (consumer RTX/GTX cards)
- NVIDIA driver with libcuda.so.1
- Linux kernel 3.0+ (NBD module)
- Standard build tools (gcc, make)
- nbd-client package
The tool offers configurable VRAM allocation with automatic fallback and optional power-aware management that auto-disables on battery power to preserve laptop battery life.
No Kernel Module Maintenance Required
A key advantage of the NBD approach is stability across system updates. The daemon survives both driver and kernel updates without requiring recompilation or maintenance, unlike traditional kernel module solutions that break with each kernel version change.
Community Reception Highlights Niche But Valuable Use Case
Posted to Hacker News on June 2, 2026, the project reached 88 points with 28 comments and coverage by Phoronix, a major Linux news outlet. One commenter summarized the sentiment: "It feels niche, but when you want it it's a good idea," while acknowledging the tradeoff of "swapping from expensive RAM to really expensive VRAM." The project is available on GitHub under the username c0dejedi.
Key Takeaways
- NBD-VRAM enables NVIDIA GPU VRAM to function as Linux swap space without kernel modules by using CUDA APIs and the NBD protocol
- Testing on RTX 3070 Laptop achieved approximately 1.3 GB/s throughput, faster than NVMe storage for swap operations
- The tool expanded total addressable memory from 16GB to 46GB (3x increase) by combining physical RAM, VRAM swap, zram, and SSD
- The architecture uses standard CUDA memory copy functions instead of NVIDIA's P2P API, ensuring compatibility across consumer RTX and GTX cards
- The project targets laptop users with soldered memory and no upgrade path, offering power-aware management that auto-disables on battery