Skip to content

20. GPU inference (Bazzite)

20. GPU inference (Bazzite)

Result: works, at 14–29% fewer tokens/s. Ollama under #19's pinned handler runs both models entirely in VRAM and returns the same text as under runc. Generation is slower, and more so for the smaller model.

Setup (2026-11-23)

  • The desktop as in #19, with the two GPU handlers. The desktop was in use during the run (KDE, Chrome and Battle.net held about 2 GiB of VRAM and 34% GPU utilization), so absolute numbers are noisy; both handlers ran under the same load.
  • spike/cri_ollama.py --pull, then --runs 2 --requests 5: one pod per handler per run, alternating which handler goes first, running ollama/ollama:0.40.6 (the version gVisor's GPU tests use) with the GPU attached by CDI and the model store bind-mounted from /var/tmp/allmyram-ollama. For each model, every model is unloaded, then five requests with a fixed prompt, seed 42, temperature 0 and 256 output tokens. Timings are Ollama's own; size_vram comes from /api/ps, since Ollama falls back to the CPU when CUDA fails.
  • The pod needed DNS servers set explicitly: containerd copies the host's /etc/resolv.conf, which on Bazzite names systemd-resolved's stub (127.0.0.53), unreachable from the pod. The script passes the host's upstream IPv4 resolvers, without Tailscale's.

Raw results

Medians of requests 2–5 over both runs; cold load is request 1 of each run.

Model Handler Generate tok/s (range) Prompt tok/s Cold load In VRAM
llama3.2:3b runc 225.9 (219.3–233.0) 8882 22.4, 22.4 s 2442 MiB
llama3.2:3b runsc-gpu-pinned 161.0 (150.4–169.7) 8116 24.6, 25.1 s 2442 MiB
llama3.1:8b runc 121.5 (112.9–123.5) 3963 2.6, 2.6 s 5035 MiB
llama3.1:8b runsc-gpu-pinned 104.6 (95.4–110.9) 3742 3.2, 3.2 s 5035 MiB
  • Ollama ready: 3.3 s under runc, 4.9–5.0 s under gVisor.
  • Ollama's log reports the same device under both: CUDA, compute 8.6, RTX 3080, cuda_v13 libraries.
  • Every response was identical for a given model, across both handlers.
  • The first request in each pod took 38–42 s wall time under either handler, 22–25 s of it reported as load, though the 3B model loads later in 2.6 s. Something in a fresh pod's first CUDA use costs about 20 s; the cause wasn't checked.

What we learned

  • A real CUDA workload works under the pinned ABI: cuBLAS, about 5 GiB of allocations, thousands of kernel launches per request.
  • gVisor costs per token, not per byte: −29% generation on the 3B model and −14% on the 8B, −5 to −9% on prompt processing. The smaller model launches more kernels per second, so a fixed cost per launch would hurt it more; that fits, but wasn't measured.
  • Cold start is about 20 s under both runtimes, and gVisor adds only 2–3 s to it. For short GPU jobs that first-use cost matters more than gVisor's.

What it changes

  • GPU inference jobs are practical on the desktop under gVisor, at a throughput cost worth stating to the job's owner.
  • A pod's DNS on a systemd-resolved host must be set by the runner; the host's resolv.conf doesn't work inside the pod.
  • Worth finding out before GPU jobs ship: what the first-use 20 s is, and whether a cache kept between jobs removes it.