Skip to content
プロジェクト

概要

複数のVMで1基のNVIDIA GPUをベアメタル並みの速度で共有できるvirtioデバイスです。

システム・インフラ

この数値の測り方

計測したスター増加

24時間
0
7日間
+3
15日間
+6
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

virtio-nvgpu

Share one NVIDIA GPU across several VMs, at bare-metal speed.

Run NVIDIA's own unmodified drivers (Vulkan, NVENC, and CUDA) inside multiple microVMs, while the host keeps the card. No vGPU licenses or VFIO passthrough needed.

Why

  1. Passthrough locks the whole GPU to one VM.
  2. vGPU costs real money and only works on datacenter cards.
  3. API forwarding (Venus, virgl) is hella slow, and doesn't support NVENC or CUDA.

virtio-nvgpu forwards the NVIDIA driver instead of the graphics API. The guest builds its own GPU commands and writes them straight to GPU memory, so a frame being drawn doesn't cross the VM boundary. Nothing gets serialized and replayed on the host the way Venus and virgl do it.

How fast

On an RTX 3060:

  • Within 2% of bare metal for any real game frame (>2 ms)
  • Same CPU cost as running on the host
  • 12 VMs on one card, splitting it evenly, each encoding 720p60 H.264 with no dropped frames

[!NOTE] 12 is what we tested, not a hard cap. Like containers, you're limited by:

  1. VRAM. A game needs gigabytes, so this usually runs out first. Cap each guest with --vram-limit-mib.
  2. Host CPU and RAM for each guest.
  3. NVENC's 12-session cap on GeForce cards. Our Nestri capture layer encodes with Vulkan Video, which doesn't count against it (16 at once worked fine).

Numbers and method →

Who it's for

People who stream games or GPU apps from headless VMs (cloud gaming, remote desktops, CI with a real GPU, selfhosted "serverless" AI) on consumer NVIDIA cards.

Before you use it

  • It isn't hardware isolation. The host NVIDIA driver is the trust boundary. If your tenants don't trust each other, use passthrough or vGPU. (It's roughly the same trust boundary Docker containers have.) Details →
  • Linux guests and hosts only. Supports driver 535.129.03 and newer.
  • This is an early version, tested on only two cards. CUDA works but hasn't been benchmarked.

Learn more

Inspired by gVisor's nvproxy, and kayfabe by Reindert Pelsma.

関連プロジェクトを探す

読み込み中…