virtio-nvgpu: NVIDIA GPU VMs Hit 2% Bare-Metal Overhead — SkimNews
Get the Tech newsletter
Daily tech — startups, AI labs, chips, the launches that shape the next decade. Free.
- virtio-nvgpu forwards NVIDIA kernel driver ioctls between a Linux guest and host at the driver ABI level, bypassing API-level translation while letting the guest run NVIDIA's unmodified user-mode drivers, Vulkan, and NVENC libraries
- Measured on an RTX 3060 with driver 595.99.02 against an identical headless Vulkan load, guests render within 2% of bare metal, and four guests sharing one card split ~26 fps each (103.7 fps combined vs 102.9 fps for a single guest) with no NVENC session limit reached
- Over 813,691 frames the virtio-nvgpu backend served 13,792 messages — roughly one VM crossing per 59 frames, nearly all device setup — versus Venus's ~2,000 serialized API calls per frame on draw-call-heavy games
- The guest owns its own GPU buffers, enabling NVENC encoding from CUDA device pointers with real CUDA interop, a capability Venus cannot offer because it host-owns buffers and blocks guest-side compositing
- The codebase splits into four components under three license zones — GPL guest driver, Apache-2.0 host device crate, shared headers — modeled on the chromeos/virtio-media layout, with the device crate deliberately VMM-agnostic and adoptable via a small trait set
Why it matters: Cloud gaming, VDI, and GPU-streaming providers currently face a binary choice on NVIDIA: VFIO passthrough dedicates a whole GPU per VM, while Venus adds 6–18% frame-budget overhead per frame and blocks guest-side encoding. virtio-nvgpu closes both gaps at once — within 2% of bare metal, flat CPU cost across four guests, and working guest-side NVENC — by virtualizing at the ioctl layer instead of the graphics API.
Ask SkimNews