hn.today

Nesbox: A fast MicroVM with GPU sharing

github.com27 points4 comments
Screenshot of Nesbox: A fast MicroVM with GPU sharing

Nesbox is a purpose-built microVM and VMM designed for cloud gaming and short-lived Linux guests that share one physical GPU. It delivers near-bare-metal rendering - measurements show guest frame times within about 2% of the host on realistic Vulkan loads - and boots straight to userspace in roughly a second. The system is explicitly not a general-purpose hypervisor or desktop VM solution: it omits full BIOS/ACPI complexity, targets Linux guests you build (ELF vmlinux kernels), and focuses on minimalism and fast startup. Practical tests include four simultaneous guests sharing an RTX 3060 while encoding H.264 at 60 Hz, and similar behavior on an AMD iGPU.

Architecturally, every VM gets a virtio-gpu device presented as virtio 1.0 over PCI (ECAM), with most devices kept in-process or passed via vhost: rutabaga_gfx backs virtio-gpu using the DRM native-context path, vhost-net and taps provide networking, vhost-vsock, virtiofs via virtiofsd, and virtio-blk runs on worker threads. The native-context path lets Mesa in the guest talk directly to the host driver so guests need no proprietary GPU driver; NVIDIA is supported via virtio-nvgpu (vhost-user) and requires NVIDIA user-mode libraries in the guest. Hosts need KVM, a DRM render node, libvirglrenderer for native-context, and virtiofsd; a provided jailer tool performs chroot-based isolation and supplies exactly the device files and paths each VM requires.

Read on github.com4 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Hardware

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.