Repository navigation
Saturation benchmark: input to present while the machine is busy (ADR 0066) - #538
Merged
Merged
Conversation
NateIsern
enabled auto-merge
November 10, 2026 01:49
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 10, 2026
… 0066, decision 1)
perf.py saturation (saturation.py) runs four interactions (a list scrolled, the pointer over a
window following it, a window dragged, keys typed) under eight loads S0 to S7 and measures each
input from its device's time (the time it carries, as libinput's would) to the first frame that
shows it, so the compositor's own wait to run is in it. Records p50/p95/p99/max, a drag's late
frames, composing and JavaScript at p95, the compositor turn's wait to run, nice and slice, the
session's and the applications' pressure, and each load's progress (a load yields, not starves).
--check holds every load's p95 to the unloaded one's plus a refresh, and a drag to no late frame.
The run is given a delegated contr
8000
ol group in which it makes a session's machine: the backup
service's unit (its unit file's settings applied as systemd applies them), the person's logind
scope and user manager (OXYOS_CGROUP_FIXTURE), another user's slice, the machine's memory for S6.
An application's load is an application the session launches.
- oxyos-offscreen: --also-launch ID[:minimized],... and --also-launch-lead MS (applications
started through the session's launcher before the steps, minimized when asked); --type-paced
HZ TEXT; every paced step's device_latency_ms; --load spin|processes|memory|repeat (load.rs).
- regress.py: also_launch (a development registry of the run's own, "{offscreen}" in Exec),
type_paced, typed.
- Probes: PointerTrackProbe, LoadAnimationProbe, LoadScriptProbe (sample/SaturationProbe.tsx).
- perf-saturation.sh: the run in a transient system unit, Delegate=yes, on CPUs no gate reserves,
its slice at CPUWeight 1000, one run at a time. A played rtkit and the accounts' service's seat
weights are used where the tree has them.
- scenarios/also-launch-paced-typing.json: what it stands on, in every gate run.
- docs/performance.mdx: Saturation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n's do The memory hog wrote one byte in each page and left the rest zero, so its pages compressed to almost nothing: zswap (ADR 0066, decision 7) would have made S6 free. Each page is now half a xorshift's bytes and half zeros, about 2:1 with lz4, as an application's anonymous memory compresses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d as it is Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the development compositor ends what it launched on an error Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ors write for it (ADR 0066, decision 6) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…loop variable, pairs of frames) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NateIsern
force-pushed
the
perf/saturation-benchmark
branch
from
November 10, 2026 07:02
a1f8df0 to
166b773
Compare
This was referenced Nov 10, 2026
…s usage keeps #529's --signal and this branch's options 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.
perf.py saturationmeasures what a person waits for while the machine is busy: the time from each input's device time to the first frame that shows it, under eight loads (ADR 0066, decision 1; design in #509). The other steps of ADR 0066 are measured against it.Interactions: Settings' sidebar scrolled by a touchpad at 60 Hz; the pointer across a window that draws where it is (125 Hz); WindowProbe dragged (125 Hz; late frames counted); twenty keys at ten a second.
Loads: S0 none · S1 a process for every CPU · S2 one process, two threads per CPU · S3 a cold
cargo build, again and again · S4 five hidden animating applications + one spinning JavaScript · S5 restic's full first backup + the search index built · S6 110 % of the machine's memory written again and again · S7 another user's processes on every CPU.How. The run gets a delegated control group and builds a session's machine in it: the backup service's unit with its unit file's settings, the person's logind scope and user manager (
OXYOS_CGROUP_FIXTURE), another user's slice, the machine's memory for S6. Application loads are applications the session launches (--also-launch, throughoxyos_apps::Launcher), so they run wherever the session puts what it launches. Each load starts 5 s before the input, and its progress is recorded.--checkholds every load's p95 to the unloaded p95 plus a refresh (16.7 ms), and a drag to no late frame. Details and commands: docs/performance.mdx, "Saturation".Baseline on the ThinkPad (today's code, 3 runs,
perf-device.sh), p95 ms, unloaded → worst:no GPU buffer was released within a second), reported for a fix of its own.Checks.
cargo fmt --check,clippy -p oxyos-offscreen --all-targets -D warnings, the new Rust tests (launch parsing, device latencies, load.rs),check-native-boundary.py,test_saturation.py(new, in CI) all pass on seldon. The gate's run ofalso-launch-paced-typing(new scenario) passed.test_regress.py'stest_two_runs_at_once_each_see_only_their_ownis flaky on seldon under load, on main too (passed, passed, failed on main's checkout); this PR doesn't touch it.Fixes since it was first queued (from the forks' first runs):
--also-launchloads running, holding regress.py's output open (one S6 run waited 22 minutes): the development compositor's session now ends what its launcher started on any exit, and the benchmark ends whatever is left in the run's session scope 3 s after the compositor is gone, and a whole run after 15 minutes.Needs from #501.
perf-device.shthere needs-p Delegate=yes,-p Environment=SATURATION_TOOLCHAIN_HOME=$HOME, and the played rtkit started outside its unit forsaturationto run on a device; I'll add them after #501 lands (the forks use a patched copy on the ThinkPad for now).The original commit-by-commit history: branch
wip/saturation-benchmark-history.🤖 Generated with Claude Code