Skip to content

15. Limits (Bazzite)

15. Limits (Bazzite)

Result: works, identically to smaug. With SELinux enforcing, containerd 2.4's CRI runs gVisor pods in a per-job cgroup, and the 512 MiB job under a 256 MiB limit is OOMKilled while the 128 MiB control completes.

Setup (2026-11-22)

  • The desktop as surveyed above. Gavin ran spike/install_bazzite_cri.sh once with sudo: gVisor release-20261116.0, crictl v1.37.0 and CNI plugins v1.10.0 (all checksum-verified) into /usr/local/bin and /opt/cni/bin with SELinux labels restored; a containerd config (format version 3, accepted by containerd 2.4.2) enabling CRI with runc and runsc handlers; the allmyram0 CNI network; containerd started for the session only; passwordless crictl; the delegated job cgroup.
  • spike/cri_memory_limit.py --runs 3 --job-cgroup, unchanged except that it now pulls its image first (the first attempt failed on a missing image, after the gVisor pod itself had started).

Raw results

Runtime 128 MiB control 512 MiB job
runsc exit 0, output, 0.59–0.62 s exit 137, OOMKilled, 0.60–0.75 s
runc exit 0, output, 0.44–0.48 s exit 137, OOMKilled, 0.57–0.59 s

Same in all three runs. The cgroup layout matches #7: the job cgroup holds the limit (peak 164.7 MB for the 128 MiB job under gVisor, 142.4 MB under runc), the container's own cgroup peaks at 0 under gVisor.

What we learned

  • Bazzite needs nothing beyond what smaug did, apart from installing the CNI plugins and using containerd 2.x's config layout (io.containerd.cri.v1.runtime). containerd runs as container_runtime_t; SELinux enforcing didn't stop gVisor.
  • Not checked: whether SELinux logged denials that didn't break anything. auditd is running, so denials go to /var/log/audit/audit.log, which needs root to read.
  • gVisor's overhead here (~22 MB over runc for the same job) matches smaug's (~18 MB).

What it changes

The desktop can be a CPU runner in v1, subject to #13's forced-egress check on Linux. GPU jobs wait for gVisor to support Bazzite's driver (survey above).