trynix benchmarks

A benchmark of the engines behind trynix. The first is a QEMU emulator built here, measured across its engine releases to check that each change to it was an improvement. The second is unkernel, the page's default since November 2026, measured at each version the site carries. Both are on the same axis, oldest first.

Real packages, cold and warm

Wall seconds to run each package in a fresh guest, first cold and then again warm, plus the time to boot to a shell.

The two engines, measured together

The suite's packages are whatever the index holds newest, so they move between records, and the two engines run different builds of them: x86_64 on QEMU, aarch64 on unkernel. This table is one run that measured both engines back to back on the same cores, which is the comparison to trust to the percent.

Instruction classes

Millions of guest instructions per second on a fixed assembly loop per mechanism the emulator pays for, so a change names a mechanism rather than a workload. Higher is better. The loops are x86_64 assembly, so these charts cover the QEMU engine only.

What moved the numbers

The changes behind the releases, in order. performance.md and engine-execution.md carry the profiles and the dead ends.

The store share

first ruby -e 1: about 35 s to about 15 s

patch 0002 路 cache=loose on the 9p mount

Packages reach the guest over a 9p share. The guest now caches the share instead of asking the host on every lookup, and resolves a path in one syscall instead of one per component.

Entropy

first run of any binary: about 50 s to 2.5 s

reseed.c 路 rdrand and virtio-rng in machine.json

The snapshot is taken before the kernel has seeded its random pool, so the first program to ask for randomness spun in a jitter loop for most of a minute. The guest now has a hardware random source and reseeds at boot.

The clock

guest time was 3.3x slow; sleep 10 took 33 s, now 10

patch 0003

The snapshot was taken on a 3.29 GHz cycle counter and resumed on a 1 GHz one, so the guest's clock ran 3.3x slow. Both builds now count the same clock, and instruction-class numbers from before are corrected by the measured ratio.

Idle, and the engine's size

idle guest 1.45 to 0.39 cores; engine download 41 MB to 13 MB

xterm-pty patch 路 ioeventfd=off 路 DWARF stripped

The main loop never slept because the pty poll returned at once; it now waits, with 9p off that loop so the wait is safe. Stripping debug info from the engine cut the download to a third.

Correctness

no speed change; opencode runs at all

patch 0004 路 guest CPU raised to x86-64-v3

The newer CPU model exposed a POPCNT that answered from a stale register, now fixed and checked in CI. opencode needs SSE4.2 and crashed until that fix, so its chart starts here.

The backend

opencode --version 408 s to 171 s; one compiled block 349 to 1163 mips

patch 0006

Blocks now compile in batches of 64 after 32 runs instead of one module per block after 1500, tail-call their successor instead of returning to a C dispatcher, and keep the guest registers in wasm locals. What remains is generated code spread over about 48,000 blocks, cache-missing on every transition.

The transition

two- and four-block loops 1.5x to 1.9x; opencode --version warm 182 s to 173 s here, cold within noise

patch 0007

A jump now caches its successor's function index in its own block, a successor in the same batch is called directly behind a guard on the live jump target, chained entries skip the rewind check only dispatcher entries need, and 64-bit multiplies are emitted inline instead of through a helper. The single hot block and the memory tests do not move; the cold-code rows do because they carry an imul per block.

Linux 7.2.5

cold jj --version 3.19 s to 3.72 s, cold python 5.30 s to 5.58 s; warm unchanged

nix/guest.nix 路 guest kernel 6.1.187 to 7.2.5

The new kernel fixes ELF loading for Fil-C binaries and costs every cold exec: it does about 70% more kernel work per first run over the 9p share, from a forward-only readahead window for executables (6.16), read completion on a work item (6.13), and page-cache code that grew across the folio conversions. No configuration setting recovers it; the profile and the diagnostic builds are in engine-execution.md.

The warm-up

cold browser CPU 4% on jj, 5% on python, 3% on opencode; warm unchanged

patch 0008

A block now interprets 128 times before it joins a batch instead of 32. A cold start spends a third of its vCPU time making code and under six percent interpreting it, so compiling a quarter of the blocks it translates was the wrong side of that trade.

The clock, again

two releases ran guest time 3.3x slow; their guest-reported columns are wrong, the host-measured ones are not

nix/native-qemu.nix 路 a guest clock check in boot-test

The snapshots of the two releases before this one were taken on a native QEMU built before patch 0003, so the guest calibrated its clock against a real cycle counter again. The snapshotter is now a derivation from the same patches as the engine, and CI times a sleep in the guest from the host. A slow clock also made opencode read 15% faster on those two records, which is not the engine: the same engine measures 188 s here with the clock right.

The lookup

call 1.34x, indirect 1.2x; python 3% and opencode 3 to 4% of browser CPU; jj unchanged

patch 0009

A return or indirect jump asked a C helper for its target on every transition. Generated code now probes a per-vCPU cache keyed on the guest state first, and hits 92 to 94% of the time.

The first command

cold jj --version 3.71 s to 2.92 s at this runner's one second of think time; 27% less browser CPU at three seconds

nix/guest/init 路 a background read after the mount

A cold exec is mostly the binary faulting in over 9p, so init reads what /share/bin links to in the background right after the mount. The first release with it also read the libraries, which helped small binaries and cost python, so hello, ripgrep and jj give a little back at the next.

A second engine

cold jj --version 3.02 s to 0.35 s, python 5.21 s to 1.09 s, opencode --version 184 s to 98 s

unkernel 路 docs/unkernel.md 路 the kernel is compiled to wasm, only the programs are emulated

A first run is mostly kernel work, which QEMU sends through the same translator as the program and unkernel runs as compiled WebAssembly. QEMU stays for x86_64 store paths, versions Hydra never built for aarch64, and browsers without JSPI. The package charts step here between two engines; "The two engines, measured together" is the like-for-like pair.

Two guest CPUs

opencode --version 55 to 114 s between runs on one CPU, 30 to 33 s on two; the other packages within a few percent

docs/unkernel.md 路 unkernel's SMP kernel 路 the bench names the guest's size in every link

The page boots the unkernel guest on up to four CPUs, and the bench boots it on two with 2048 MiB, where the records before ran on one with 512 MiB. On one CPU, opencode's threads made its time swing two to one between runs, so the earlier opencode points are one draw from that spread.

The second CPU at boot

boot to a shell 2.99 s to 2.44 s, the median of 25 boots each; opencode --version 30.0 s before and 30.1 s after

nix/vendor.nix 路 rcupdate.rcu_expedited=1 路 unkernel#43 路 the same unkernel, booted differently

The page applied unkernel's SMP kernel, a binary diff of the one-CPU kernel, at every boot for about 150 ms; the site's build now applies it once. Once a second CPU was up, six of the guest's DHCP calls each waited out an RCU grace period of 12 to 42 ms, and rcupdate.rcu_expedited=1 ends a grace period at once. This record's cold opencode, 33.4 s, is one run; ten runs alternating this page and the one before ranged from 29.9 to 30.7 s.

Appendix