💻virtio-nvgpu Brings Near-Native GPU Access to KVM Guests
Near-native GPU access in KVM guests, no compromises
TL;DR
virtio-nvgpu offers near-native NVIDIA GPU access in KVM guests, rendering within 2% of bare metal and costing the same CPU. Perfect for headless streaming and gaming.
virtio-nvgpu provides near-native NVIDIA GPU access inside a KVM guest, rendering within 2% of the machine it's running on and costing the same CPU. This is a big deal for developers running GPU-intensive workloads in virtualized environments. Measured on an RTX 3060, the guest renders at 0.4% faster than bare metal, with CPU usage at 0.40 seconds for bare metal and 0.37 seconds for the guest. Four guests can share one RTX 3060, each rendering at 25-26 fps, without impacting performance.
Key Points
virtio-nvgpu forwards NVIDIA kernel driver ioctls between a Linux guest and the host, enabling near-native GPU access.
Guests run NVIDIA's user-mode drivers unmodified, rendering within 2% of bare metal performance.
Four guests can share one RTX 3060, each rendering at 25-26 fps, with no performance degradation.
Measured on an RTX 3060 (driver 595.99.02), guest performance is 0.4% faster than bare metal, with CPU usage at 0.40 seconds for bare metal and 0.37 seconds for the guest.
virtio-nvgpu supports Vulkan rendering and NVENC through Vulkan Video, with compressed video output.
Why It Matters
If you're running GPU-intensive workloads in KVM guests, virtio-nvgpu flips the economics. Four guests can share one RTX 3060, each rendering at 25-26 fps, without impacting performance. This is a game-changer for developers looking to optimize GPU usage in virtualized environments.
Comments
Be the first to comment
Enjoyed this article?
Get it daily. 7am. Free. Reads in 5 minutes.
Join 3,492 builders reading daily.