Repository navigation
Conversation
…host (#563) #563's first section asks what nesting costs a running workspace, not its boot: the host CPU each unit of work takes, nested against metal. Two probes measure it. io runs fio inside the guest against a raw disk attached after the boot, one job a row: 4 KiB random read and write at 1 and 32 in flight, 1 MiB sequential at 8. It records IOPS, MiB/s, completion latency, and the CPU each GiB moved took, QEMU's (every thread, /proc/PID/stat) and the guest's. fio is the new fio edit, built from a release versions.yaml pins. build times `go build cmd/go` with an empty cache inside the guest, on an attached ext4 disk holding the host's Go toolchain, and records QEMU's and the guest's CPU over it. Both disks are raw files on the host's tmpfs. The bench's scratch is NVMe and bench-metal's is EBS, and QEMU writes through the host's page cache, so either device would have been measured beside the hypervisors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#563) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aledbf
force-pushed
the
lab/563-io-tax
branch
from
November 23, 2026 17:58
e2e16ef to
6fdc778
Compare
aledbf
marked this pull request as ready for review
November 23, 2026 17:58
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The goal is a cold boot to the first SSH login in under 100 ms. This PR does not move it. It answers a question for spin's metal-or-nested cost model (spin-stack/spin#1652, #1654): what nesting costs a running workspace, as host CPU per unit of work. #563 section 1 asks for it, and no probe measured it.
What
io: fio inside the guest against a raw disk attached after the boot, as spin attaches a workspace's disks. One job a row: 4 KiB random read and write at QD1 and QD32, 1 MiB sequential read and write at QD8, each time-based (runtime, default 10 s, no ramp). It records IOPS, MiB/s, completion latency p50/p99, and the CPU each GiB moved took, QEMU's (every thread,/proc/PID/stat) and the guest's (/proc/statbusy).build:go build cmd/gowith an empty cache and itssync, inside the guest, on an attached ext4 disk holding the host's Go toolchain (go.mod's toolchain). It records wall time, QEMU's CPU and the guest's.--edit fio: fio 3.43, pinned in versions.yaml and built byinternal/lab/fio.Dockerfileon the guest's Ubuntu, as the bootchart edit builds its binary.Equal storage. Both probes put their disk on the host's tmpfs. The bench's scratch is local NVMe and bench-metal's is EBS. QEMU writes through the host's page cache (no
cache.direct), so a disk on either device would have measured writeback to two different devices beside the hypervisors. On tmpfs every request ends in host memory. What still differs between the two hosts is the path through one hypervisor or two. Which device a workspace should live on is a separate question (#563's NVMe-metal option).The results go to docs/boot-time.md in this PR once the bench and bench-metal runs are in.
Verification
go tool task lint testgreen locally.ioandbuildran at 1 and 4 vCPUs, and nothing was lost.🤖 Generated with Claude Code