Podcast Episode

Containers vs VMs for GPU Inference: What You Actually Pay

My Weird Prompts

Episode 5964Oct 14, 202631 min

Who’s talking

4 speakers
Herman Poppleberry20 min · 70%
Corn4 min · 13%
Hilbert Flumingtop3 min · 11%
Chatterbox1 min · 5%

1Transcript171 turns · 31 min

C
Chatterbox0:00

A sloth, a donkey, and a curious human. Send a prompt and see what they're doing. One hits a record with a question on his mind. Two brothers pick it up, see what they find. Corn takes his time, Herman's got the facts. Back and forth, they never hold back. My weird prompts, come on in, that's where we begin. My weird prompts, glad you're here.

HF
Hilbert Flumingtop0:25

This episode was generated using artificial intelligence. Please verify facts.

C
Corn0:31

A container adds three hundredths of one percent, not three percent, zero point zero three.

HP
Herman Poppleberry0:38

Which sounds like a typo until you understand what a container actually is.

C
Corn0:42

Daniel's question this week is about what you pay when you move the same open weight model off bare metal and into something else. He wants the overhead numbers, not the configuration guide. Container, KVM virtual machine with PCIe passthrough, bare metal as the baseline, and then the harder part, which is where that overhead actually lives, and whether NVIDIA and AMD differ in any way that matters.

HP
Herman Poppleberry1:08

And the reason it's worth a whole episode is that the published numbers look like they're describing different universes. You've got papers saying passthrough costs you nothing, and papers saying it costs you a third of your throughput.

C
Corn1:20

Both are true. That's the fun part.

HP
Herman Poppleberry1:24

The real question isn't whether virtualization is slow. It's which isolation model on which hardware for which workload shape. Because the benchmark literature is quietly conflating at least four different things under the single word virtualization. There's the container, which shares the host kernel and the host driver. There's single GPU passthrough, where the hypervisor hands one card to one guest and gets out of the way. There's multi-GPU passthrough, where the guest owns several cards and the interconnect between them suddenly matters. And then there's shared GPU virtualization, the MIG and SR, IOV, and vGPU family, which is a completely different product with a completely different overhead profile.

C
Corn2:05

Four different things wearing one word. That's why the numbers don't reconcile.

HP
Herman Poppleberry2:11

Right. And before we get into any of it, the baseline has to be pinned down, because bare metal isn't a single number either. Kernel version, driver version, whether the CPU governor is set to performance, whether the process is NUMA aligned to the right socket. A tuned bare metal baseline and a sloppy one differ by more than the entire container overhead we're about to discuss.

C
Corn2:33

So let's start with the number everyone repeats. Containers are free. Find out whether that's actually true.

HP
Herman Poppleberry2:40

It's true, and the mechanism is boring in the best way. Docker and Podman share the host kernel. There's no hypervisor, no second kernel, no device emulation. When the inference engine submits a CUDA kernel inside a container, it goes through the same driver stack, the same IOCTL path, the same GPU, and the kernel executes identically. The container boundary is namespaces and scroops. It's a boundary around file systems, process trees, and resource quotas. It's not a boundary around the hardware.

C
Corn3:10

So the GPU never learns. It's in a container.

HP
Herman Poppleberry3:14

The GPU has no idea. It's the same instructions on the same silicon.

C
Corn3:18

What's the actual measurement?

HP
Herman Poppleberry3:20

The

2Episode notes

Daniel asked a simple question: what do you actually pay when you move an open-weight model off bare metal and into a container or a KVM virtual machine with PCIe passthrough? The published numbers don't agree — one paper measures containers at 0.03% overhead, another measures VMs at 21% average and up to 36% on the worst run. Both are correct. This episode unpacks why the benchmark literature quietly conflates four different isolation models under the single word "virtualization," where the overhead actually lives (spoiler: it's the IOMMU and the host scheduler, not the GPU), and which workload shapes feel it most. We also walk through a real deployment that booted perfectly, reported all eight GPUs healthy, and had silently lost GPU-to-GPU peer-to-peer — the kind of failure that doesn't show up until you're already in production. Key sources: • ICCS 2026 — https://www.iccs-meeting.org/archive/iccs2026/papers/167840464.pdf • AMD Instinct docs — https://instinct.docs.amd.com/projects/virt-drv/en/latest/userguides/Getting%5Fstarted%5Fwith%5FMxGPU.html • AMD MxGPU-Virtualization GIM 9.0.0.K release notes — https://github.com/amd/MxGPU-Virtualization/releases/tag/9.0.0.K Episode 5964 — myweirdprompts.com/n/5964 (permanent short link: myweirdprompts.com/023477)

Showing a preview — retrieve the full transcript via the Exa API.

Powered by the Exa API

See something wrong or missing on this page?