Repository navigation
boot: where a boot's time goes, and the first SSH login 60 ms sooner - #240
Merged
Merged
Conversation
Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>
Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>
Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>
Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>
…bwatch The pull request's gate failed on 130 mutations no test refused. The library code now has a test for each edge it decides on: a unit's name, each way a unit sits in the dump, console noise between its blocks, what a unit waited on and the ties between candidates, where a gap begins and ends and which unit ended it, the order behind the prompt, every event's fields, when a job ran, and Lag's cut-offs. startingAt and After answer from a map, so their tests ask 64 times, through many orders. jobwatch's main, watch and now and vsockproxy's main are held by the lanes that run them in a guest (mutate-lane: ./boot.TestBootJobs, ./boot.TestFirstSSH). Exempted with the reason on the line: comparisons of a duration with zero, where every duration is whole microseconds, and the scanner buffer's size and ParseUint's bit size, past what any input reaches. ParseJobs loses an assignment the loop after it already made. task mutate against origin/main: 181 refused, 0 survived. Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Where a boot's time goes, measured on the bench fleet, and what that bought: the first SSH login 60 ms sooner and the kernel 6.2 ms faster. Every number below is the bench fleet (AWS c8i.4xlarge, KVM nested), boots interleaved, p50.
What changes in the release
kernel/patches/0005: a device's PCI capability list is walked once, kept instruct pci_devacpi_init14 → 10;virtio_pci_driver_init6.5 → 4.7;inet_init(reads no config space) 7.50 → 7.49; ECAM accesses per boot 1,032 → 680pam_motdoff in sshd's and login's stackssshd@.servicewaits for the host keysssh .hostworked not at all: the per-connection sshd found no host keys and dropped the connectionboot:ssh-firstTogether, the first login from launch should be about 505 ms against 570. That is an estimate, image and kernel measured apart, because the lab boots published releases; the release's own
boot:ssh-firstandboot:initcallsconfirm it.The console prompt comes about 80 ms later with linger, because spin's manager now starts in the boot. Nothing a workspace does waits for it, but it is what
boot:bench'susablecolumn reads.No fingerprint moves: nothing under
machine/changes, and a resumed guest runs the kernel it was saved with.New probes
boot:waits: what waited on what between PID 1 and the login, from systemd's timestamps after the boot: a critical path that accounts for every millisecond, the gaps with no unit activating, and what still starts behind the prompt.boot:jobs: PID 1's job queue recorded live over/run/systemd/privatebyboot/jobwatch, a diagnostic binary in the boot's overlay, beside boots without it. It also records the jobs the first SSH login sets off.boot:ssh-first: from the host, over vsock (boot/vsockproxy): when sshd accepts, when the first login is done, and what a second one costs.boot:exits: KVM's counters per phase (exits by kind, EPT faults, how the guest's RAM is mapped), and a row without virtio-rng.boot:mmio: whose exits they are, from QEMU's trace: every PCI config access by device, every MMIO/PIO access by region.All five run in the lab (
lab.yml).Fixed tools
SPIN_GRAPHandSPIN_CPU_SHAREtraced nothing since the kernel forced lockdown at confidentiality (1400f6a), which closes tracefs, and reported "the trace is empty". They now print the lockdown level and say how to trace a kernel B built without it (kernel/README.md).parseGraphread a function that migrated CPUs (acpi_initopened on CPU 1, closed on CPU 0) as nothing.boot:tracetakesSPIN_TRACE_APPENDandFLAGS.Measured and not shipped
dev-ttyS0.device: 342 against 345 ms (lab 43303190733).pci=noearly: the guest gets no ECAM and does not boot.bpf_check). Measured, nothing done.Checked
task lint,task test.compat.ymlon the branch (43329268857): a checkpoint of the release before resumes here;boot:roms;boot:lockdown.kernel.yml(43330642231) andimage.yml(43330637817) on the branch.image/build.shasserts on the finished filesystem: nopam_motd, spin lingering, the logind want not overridden, and thesshd@drop-in.report's matrix boots on the patched kernel, every row (lab 43328179961).spin-machine attach/detachof a disk works, and every device's MSI-X vectors are identical to the release kernel's.boot:logindwith logind in the boot.Notes for review
configure-system.sh,optimize-systemd.sh,10-seats.conf,build.sh,boot/logind_test.go).boot:logind'sSPIN_LOGIND_NO_SEATS=1control was written to fail, and on this image (systemd 259) it passes. So the10-seats.confdrop-in may no longer be needed. Not settled here.go.modgainsgithub.com/godbus/dbus/v5v5.1.0, used only byboot/jobwatch, which is never in a release.🤖 Generated with Claude Code