Skip to content

allmyram spike experiments

A working document. Each experiment tests exactly one new thing, so a failure points at one cause. Results are appended as each one runs, in its own commit. This is a throwaway spike: nothing here is the product.

What allmyram is (so far)

An open-source way to run development jobs on machines you already own and aren't fully using. Transpire is the first user: its laptop-side AI agents run out of CPU and memory running checks, and those checks should run elsewhere.

Decided in the 2026-11-22 brainstorm:

  • Transport: tailcat (github.com/tailscale/tailcat). No accounts, no control plane. Machines never join a shared network.
  • Identity: SSH certificates signed by one owner's root key, short-lived, joined by invite. Single owner only for now.
  • Job protocol: SSH over tailcat. A job is an OCI image, a git snapshot and a command. Output is streamed; jobs are owned by the runner and resumable; a vanished runner is a visible failure.
  • Sandbox: gVisor on Linux, one apple/container VM per job on macOS. Windows is a non-goal for now.
  • Linux runtime (after round 1): rootful containerd with gVisor's runsc shim. Round 1 ran runsc under rootless Podman, which gVisor doesn't support: Podman isn't a documented platform, our first cgroup error is open issue google/gvisor#11543, and the fix is the unmerged pull request #17702. Docker and Kubernetes are out (Gavin: too much configuration).
  • macOS runtime: stays one VM per job. A shared Lima VM running containerd would give one Linux stack everywhere, but its state builds up and eventually has to be wiped, as Rancher Desktop's reset shows. Two runtime backends is the price.
  • Native gVisor on macOS (watch, don't plan on it): a 2026-11-06 feasibility study (milantracy/gvisor@a5b11f8, tracking google/gvisor#1270) targets a Hypervisor.framework platform. It aims at a runsc do-style CLI, not containerd/OCI; has no seccomp and calls its first phase not a sandbox; puts host files and networking in phase 2; and estimates more than a year before that. Keep the runtime backend behind a narrow interface so it could replace apple/container later.
  • Snapshot: git plumbing (temporary GIT_INDEX_FILE, commit-tree, push a ref), not jj.
  • Tracker: optional, BitTorrent sense. Answers "what's going on?" at a glance and never sits in a job's path.
  • Not precluded: cloud workers and cloud agents.
  • The hoard (Gavin): the name for one owner's set of machines (runners, clients, tracker), all joined the same way.
  • Jobs talk to each other over tailcat (Gavin, after #12), and a job can be a service someone needs for a while in development, reachable the same way. Within one job, services stay on localhost (Linux) or the job's own VMs (macOS).
  • Service jobs live on a lease renewed by whoever asked for them; when that requester's network presence goes away, the service stops itself. Services are reachable only by allowed tailcat keys: never published to the internet, nothing like Tailscale Funnel (Gavin). The lease is the requester's live tailcat session; after it drops, the service gets a 15-minute grace window to survive network changes and short sleeps.
  • Install: a one-time root step by the machine's owner is acceptable, so jobs get cgroup limits. With rootful containerd, that step is installing and running containerd.
  • Linux runner is two systemd services, neither running as root (Gavin, after #12: "we do not want to run as root"): an unprivileged runner (tailcat, SSH certificates, leases, job state) and a small helper, as its own system user holding containerd's socket and the delegated job slice, that only creates a job's cgroup, starts its CRI pod in it, and tears it down, over a local socket. Root is used once, at install.
  • Outbound traffic goes through a forced proxy from v1 (Gavin). A job can reach only its own services, the runner's proxy and runner-forwarded tailcat ports. The v1 proxy allows the public internet and refuses the owner's networks (private ranges, link-local, 100.64/10, the tailnet), deciding on resolved addresses, with enough logging and tested denials to prove it. The runner holds each job's tailcat endpoint outside the sandbox.
  • Runners are opportunistic (Gavin: machines are often idle; one human): CPU at idle priority, memory admitted against what's free now, and under memory pressure the newest jobs are preempted and reported as preempted.

Hosts

Host OS Arch GPU Sandbox
smaug Debian x86 none gVisor
gaming desktop Bazzite x86 RTX 3080 gVisor (+ nvproxy with a pinned driver ABI, #19)
Mac mini / laptops macOS Arm Apple apple/container

This round runs on smaug only. macOS and Bazzite get their own round.

Experiments

# Experiment Learning goal Smallest test
1 Transport Can the laptop reach smaug through tailcat with SSH certificate auth? Direct or relayed, and what latency? Stock sshd trusting a test CA, behind tailcat serve; run uname -a. No sandbox, no repo.
2 Sandbox Does gVisor install and run on Debian, and what does each start cost? runsc running true and a small image, timed cold and warm. No laptop, no repo.
3 Snapshot Does the temporary-index snapshot capture tracked + untracked files without touching the user's state, and how many bytes travel? Snapshot a worktree with a known untracked file, push to a clone on smaug, check out, compare. No sandbox.
4 Real suite Does a real Python suite with uv caches work under gVisor, and how slow is it versus the laptop? meristem test-unit (no emulator: it ignores tests/integration) in runsc on the checkout from #3.
5 One service Does the Spanner emulator run under gVisor, and how long until healthy? Start only the emulator image in runsc; poll its health. No tests.
6 Job + service Can a job and a service share one gVisor sandbox network? A curl container reaching the emulator from #5 inside one sandbox.
7 Limits Does rootful containerd with gVisor's shim enforce a memory limit, stopping only the job that exceeds it? One container with a 256 MiB limit allocating 512 MiB, plus a control allocating 128 MiB. No network, no repo.
8 Shared sandbox Can a job and a service run as two containers in one gVisor sandbox under containerd, reaching each other on localhost? The emulator as the sandbox's first container, then a curl container added to it by the shim's io.kubernetes.cri.* annotations. No tests, no repo.
9 VM per job Does apple/container run on a Mac here, and what does one VM per container cost to start and to keep in memory? container run --rm of a small image running true, timed cold and warm; host memory of one idle container. No limits, no network, no repo.
10 Limits (macOS) Does a container memory limit stop only the job that exceeds it? #7's test: a 256 MiB container writing 128 MiB (control) and 512 MiB.
11 Job + service (macOS) Can a job reach a service running in another container's VM, and how long until usable? The emulator in one container, #8's probe in another, reaching it over the container network.
12 Job on tailcat Can a job be its own tailcat endpoint without costing too much, on macOS in particular? tailcat serve --key new inside one apple/container VM, beside an identical idle VM; also on smaug's host for reference.
13 Forced egress (Linux) Can a gVisor CRI pod be given a network whose only reachable outside address is a proxy on the host? A pod whose curl to the internet fails directly and succeeds through a host proxy; LAN and tailnet unreachable either way.
14 Forced egress (macOS) Can an apple/container VM be given a network whose only reachable outside address is a proxy on the Mac? The same three checks from a VM.
15 Limits (Bazzite) Does #7's setup (containerd CRI, gVisor, a per-job cgroup) enforce a memory limit on Bazzite with SELinux enforcing? #7's test, unchanged, on the desktop.
16 Proxy redirect and IPv6 (macOS) Can pf redirect each job network's <gateway>:3128 to one proxy on loopback, and does #14's anchor need an IPv6 block for the ULA and fe80:: addresses every job network gets? #14's checks from a VM with no anchor, the anchor with IPv4 rules only, and the anchor with an IPv6 block.
17 Lima start and stop Can one Lima VM running containerd and gVisor start and stop quickly enough to hold memory only while there is work? Create, start and stop a Lima 2.3.0 vz VM (Debian 13 arm64, 4 CPUs, 8 GiB), timed, with its memory measured.
18 Crossing into the Lima VM How do the helper's socket, staged and running workspaces, CRI logs and the pod-to-run map cross between the Mac and the VM, and do pods stay boxed in inside it? #17's template plus one writable virtiofs share and one forwarded socket, in a scratch LIMA_HOME.
19 GPU jobs (Bazzite) Can a gVisor CRI pod use the desktop's GPU on a driver nvproxy doesn't list, with only runsc's flags (--nvproxy-allow-unsupported-driver, --nvproxy-driver-version)? (Goal written after the run.) nvidia-smi and a CUDA vectorAdd, GPU attached by CDI, under runc and under each flag.
20 GPU inference (Bazzite) Does a real CUDA workload (LLM inference: cuBLAS, large allocations, long kernels) run under #19's pinned handler, and what does gVisor cost in model load time and tokens/s against runc? Ollama serving a 3B and an 8B model in one pod; a fixed prompt, seed and length, 5 requests per model, under runc and runsc-gpu-pinned.
21 Driver ABI diff Did any ioctl or its parameter struct that nvproxy handles change between NVIDIA 620.51.03 and 620.70.06? If not, #19's pin is safe for every workload, not just the ones tested. Diff NVIDIA's open-gpu-kernel-modules at the two tags, restricted to the headers nvproxy mirrors. No GPU.
22 An immutable VM OS under Lima Can the Mac runner's VM be an image we build (a digest-pinned Fedora bootc base plus our bits, read-only root) that Lima boots, with /var on its own disk? A Fedora bootc image with containerd, gVisor and deploy/linux's units, booted under Lima 2.3.0 vz.
23 The smallest VM image How small can the VM image get if built up from what it must hold, rather than trimmed from a distribution? A minimal Fedora bootc image passing #22's boot, forced-egress job and hard-kill checks, with its idle memory measured.
24 Garden Linux under Lima Does Garden Linux, built from Debian with pinned releases and a lima feature, boot under Lima with our stack, and what does it idle at? Garden Linux 2150.15.0's Lima image under vz, then our own flavor from its builder, with idle memory measured.
25 Two sandboxes sharing one directory Can jobs in separate gVisor sandboxes share a host directory: does one see the other's writes promptly, and do file locks cross sandboxes? Two CRI pods mounting one host directory, taking and testing flock() and lockf() and timing a rewrite, against runc.
26 What a pad costs Can a job's pad be copy-on-first-write without root, and if not, what does an eager reflink clone per job cost on real caches? A rootless kernel overlay reached through /proc/PID/root, then eager clones of real caches, timed, on smaug.
27 A hosts file under runsc Does a file mounted at /etc/hosts replace containerd's own in a gVisor pod, and do names in it resolve for glibc and musl images? A Debian and an Alpine container mounting one hosts file, beside a control without it, checked through ExecSync on smaug and in the Mac VM.
28 A healthcheck through ExecSync Can a service's healthcheck run in its own container through CRI ExecSync under gVisor, with a timeout that works? Exit codes, a shell, a missing binary and sleep 30 with a 2 s timeout, through ExecSync, in #27's pod.
29 Postgres and the emulator in one pod Do postgres:18 and the Spanner emulator start as services in one gVisor pod under their own users, and does the job's container reach them by name? Both images and a pg_isready loop in a third container, with #27's hosts file, on smaug and in the Mac VM.
30 File-backed root overlays Where do a gVisor container's writes to its own filesystem land today, does a file-backed overlay keep them out of the job's memory and leave nothing behind, and can runsc cap the file per container? 2 GiB written by uid 999 in one pod, with the sandbox cgroup's memory and the disk's free space measured, under runsc's defaults and under overlay2 values set through containerd's ConfigPath.

Deliberately left out: schema-control-test-spanner-emulator only combines

4–#6 (a final check, not an experiment), and scripts-test-emulator adds

Postgres, which is not an open question under gVisor.

Experiments 7 and 8 were added after round 1 moved Linux to rootful containerd. They reuse #5's emulator image and nothing else, and #8 assumes nothing about limits, so neither depends on the other's answer. nerdctl is the client for the spike only; the product would use containerd's Go client.

Experiments 9–11 are the macOS round, run on Gavin's MacBook Pro (Apple M5, 32 GiB, macOS 27.2.1) standing in for a Mac mini. They ask #2, #7 and #8's questions of apple/container, where every container is its own VM, so a job and its service can't share one sandbox and must talk over a network.

Each result section records: setup (exact commands and versions), raw results, what we learned, and what it changes in the design.

Round 1 summary

# Question Answer
1 Transport Yes: certificate SSH over tailcat, ~50 ms per command on the LAN
2 Sandbox Yes, rootless, but with no cgroups, so no CPU or memory limits
3 Snapshot Yes, exact and kilobytes per job; Git LFS needs design work
4 Real suite Yes; gVisor adds ~15% to test time; .venv setup dominates short jobs
5 One service Yes, ~1.2 s to usable; published ports need network=host; ~410 MiB per sandbox (unexplained)
6 Job + service Yes, on a per-job network with gVisor's own stack; pods unsupported

Open items this round surfaced, most important first:

  1. cgroups for rootless runners (experiment 2): without them a job can exhaust the owner's machine. Resolved by experiment 7: rootful containerd through CRI, with a cgroup per job.
  2. gVisor memory per sandbox (experiments 5 and 6): measure properly; it decides how many jobs a runner can hold. Resolved by experiment 8: about 20 MiB per pod, measured on the job cgroup.
  3. Job network policy (experiment 6): verify a job can't reach the LAN, the host or other jobs.
  4. Git LFS (experiment 3): detect it and fail visibly until content can be supplied.
  5. Warm per-repo environments (experiment 4).
  6. Relayed and off-LAN tailcat paths (experiment 1).
  7. macOS (apple/container) and Bazzite hosts: round 2.

Bazzite survey (no experiment)

Read-only look at the gaming desktop over SSH, 2026-11-22, before planning a Bazzite round.

  • Bazzite 45.20261117.1 (Kinoite), image bazzite-dx-nvidia:stable, kernel 7.3.4-ogc8.1.fc45, systemd 262. 32 threads, 62 GiB (44 available).
  • SELinux Enforcing. Root is a read-only composefs; /usr/local is a link to /var/usrlocal, which is writable, so a /usr/local/bin install works as on smaug.
  • The -dx image ships Docker, containerd, runc and crun. Docker and containerd are installed but inactive; /etc/containerd/config.toml has disabled_plugins = ["cri"] (Docker's default). Enabling CRI for allmyram means editing a config Docker also uses.
  • cgroup v2 with cpu, memory, pids (and dmem) available.
  • RTX 3080, NVIDIA driver 620.70.06. gVisor release-20261116.0's runsc nvproxy list-supported-drivers ends at 620.51.03, so GPU jobs under gVisor won't run on this driver. Bazzite updates drivers with its image; gVisor adds support after the fact, so mismatches will recur.
  • gVisor downloaded and checked (sha512) to ~/allmyram-spike/dl/gvisor; nothing installed.