Skip to content

osbench: a console program's launch to its first output, and the rows still owed against Linux - #1231

Draft
Japabu wants to merge 2 commits into
benchrowsfrom
benchrows-launch
Draft

Japabu wants to merge 2 commits into
benchrowsfrom
benchrows-launch

Conversation

@Japabu

@Japabu Japabu commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #1230 (base benchrows); retarget to main once that lands. Test code and one issue record: no product code, no manual page.

Two performance requirements set ToyOS against Linux on matched work: build throughput, and an application's launch to a usable state, cold and warm. osbench measured neither as the work itself. This adds the one row that can be built now and records the rest.

What changes

  • proc.launch.first_output: osbench spawns itself as osbench hello with its stdout piped, and times from the spawn to the first byte it reads, 100 launches after 10, warm. The child's exit and the wait for it fall outside the time, which is what sets it apart from proc.posix_spawn_wait.std (spawn, run, exit, wait). It is the warm half of the launch requirement for a console program: the same static binary on both systems, std and all.
  • issues/osbench-compares-no-compiler-build-windowed-launch-boot-frame-or-audio-period-with-linux.md: the rows that are designed and not built, each with what it waits on.
    • A compiler build (work.cc.j1, work.cc.j<cpus>): doomgeneric at apps/doom/build.rs's pin, or the TinyCC corpus, compiled by one LLVM commit's clang and linked by its LLD on both systems for the same target and sysroot, so both must link the same bytes; the compare refuses the row where the SHA-256s differ. It waits first on clang linking in a guest at all (hosted_clang_hello is red at the link until item 5 of issues/toyos-builds-itself.md), then on staged ROOT files for a metal arm (only a QEMU boot takes them today) to carry the 83.8 MB package, and on that commit's clang and LLD for x86-64 Linux.
    • A windowed launch, a boot to a usable session, a frame and an audio period: each designed as one work on both systems, with its blockers (a Wayland session an ssh run reaches, winit without wayland-dlopen in a static binary, a compositor image row, a session-up moment ToyOS does not record, a refresh rate ToyOS's window protocol does not give, an underrun count no ToyOS client can read, cpal's ALSA in a static binary).

Decisions a reviewer should weigh

  • Warm only. Cold needs each system's file cache dropped; ToyOS has no such call, and its ROOT is served from memory. The record keeps cold with the windowed launch.
  • No row for a figure one system alone can produce. The boot.* conditions stay conditions: ToyOS's first job and Ubuntu's systemd-analyze are of two different boots.

Checks

Status: draft. The host suite, the metal boot and the Linux runs are pending.

  • Linux build cargo +nightly-2026-07-22 build -p osbench --target x86_64-unknown-linux-musl --profile toyos at 54cfdfd2a: exit 0; the binary handed to the benches has SHA-256 e6638cd2162a4369fc2e298ccfa578e0fe603466a528d79b75c2e86ff3fe6645.
  • Host suite cargo run -- --ci host at 54cfdfd2a: pending.
  • Metal: the osbench row's benchcase image staged at 54cfdfd2a and requested on the T14 and the AMD bench, each with a Linux run of the same binary; pending. No guest row runs procs, so the new row is first read there.

🤖 Generated with Claude Code

… still owed against Linux

Two performance requirements set ToyOS against Linux on matched work: build
throughput, and an application's launch to a usable state. osbench measured
neither as the work itself.

proc.launch.first_output is the warm half of the second for a console
program: osbench spawns itself as `osbench hello` with its stdout piped and
times from the spawn to the first byte it reads, 100 launches after 10. The
child's exit and the wait for it are outside the time, which is what sets it
apart from proc.posix_spawn_wait.std. Both systems run the same binary, from
memory once warm.

The issue record holds the rows that are designed and not built, each with
what it waits on: a compiler build (clang and LLD of one LLVM commit on both
systems, linking identical bytes, waiting first on clang linking in a guest
at all), a windowed launch, a boot to a usable session, a frame and an audio
period.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and tells no client

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant