Skip to content

perf: narrow retired-page searches using existing owner bounds (#610) - #611

Merged
zackees merged 8 commits into
mainfrom
perf/610-retired-search
Oct 22, 2026
Merged

zackees merged 8 commits into
mainfrom
perf/610-retired-search

Conversation

@zackees

@zackees zackees commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #610. Current source: v3 b2978df6ae0266e8ebd47f116874fba72a38e340. Draft; v3 correctness/platform gates have passed. Full performance coverage is complete; acceptance remains pending.

Intersect the retired-page best-fit scan with the owner's existing retired-bin bounds, and run the selector in a separate explicitly noinline function. Keep selection/ties, exact-fit exit, unpublished/full/busy slots, aging, budgets, geometry, ownership and purge policy. No new fields, tuning options, mandatory dependencies, or workload/configuration specialization. The counted inline body is shared with tests; the production wrapper passes NULL and eliminates that counter. C-core and Rust regeneration are separate commits.

Frozen baseline: 2c7fed4edf91cf412c8969cf3cafeb690f0ed3e3. Fetch/rebase checks still report up to date. Existing perf-ab allocator/replay builds route through soldr; traces, order, seeds, touches, operation counts and metric thresholds are unchanged.

Rejected sources remain in the record

Revision Disposition
V1 42d06c34, inline full bounds Rejected: plain ephemeral p99 +3.645% [95% CI +2.874%, +5.065%] FAIL. Full original cohort: 65 PASS, 12 INCONCLUSIVE, 1 FAIL.
V2 a718c4e7, inline prefix only Rejected: chart-ephemeral p99 +2.142% [+1.091%, +3.200%] FAIL, plus an incomplete random-large/8 RSS sanity failure. Main/sparse CPU gains do not compensate. Complete original ledger: 60 PASS, 11 INCONCLUSIVE, one p99 FAIL across 12 complete rows, plus the separate incomplete sanity failure.
V3 b2978df6, separate full-bounds selector New design hypothesis. No performance acceptance claimed.

Original v1 ledger · Complete v2 ledger · V2 sanity failure · V2 p99 failure and attribution limits.

The baseline-only RSS diagnostic completed 60 samples per arm on EPYC 7763 with identical binaries and zero threshold crossings. It does not explain the failed EPYC 9V45 execution or clear that failure. All raw samples, binaries, profiles, errors and scripts are retained for durable archival.

V3 verification and costs

  • Work-count RED on v2: 9 visits where full bounds require 3. GREEN on v3: 3; original baseline RED and empty/exact-fit checks retained. Every synthetic case compares the actual compiled entry point with the counted shared body.
  • Focused C and C++ CTests PASS. Review guard mismatch reproduced RED; non-separated metadata and disabled-repurpose translation units GREEN after aligning guards. Same sole reviewer CLEAN.
  • Required local gate: 45/45 PASS in 50s. All nine named v3 correctness/platform workflows PASS, including native MSVC, Windows GNU/clang-cl, both native Macs, Rust, ASan, cross, lint, fuzz and purge regression. Tested PR merge 5fb9a1b99050ae822a26cc1dc6f3058338c64311 has the identical entire Git tree as the measured head (fc385abeb61f…). Performance acceptance remains pending; source correctness does not replace missing target/control measurements.
  • Matching Release flags show a 1,046-byte caller and 200-byte selector, versus baseline's 1,158-byte inline caller. The two-function sum grows 88 bytes. This isolates caller footprint; it does not prove the historical p99 cause or a speedup. Earlier override-on prototype bytes/flags are retained separately.

Predeclared staged comparison

Full v3 plan: first measure main, plain ephemeral and chart-ephemeral, once each, with 60 initial samples/arm, adaptive cap 120, null arm and sanity gate on. If these have no FAIL/sanity or service-bound violation and at least one supported CPU/throughput target gain, measure the remaining ten rows exactly once. These complete the same 12 defaults plus sparse-64-slot diagnostic, including small/Larson controls. Do not remeasure the first three or mix older passes into v3.

Report all six metrics and original PASS/INCONCLUSIVE/FAIL labels, preserving incomplete failures. No new uncertainty tolerance or memory credit is introduced; retain canonical and stricter zero-credit checks. A confirmed scenario FAIL rejects the source. Merge and cleanup remain pending acceptance; rebase to origin/main again after merge.

Current measurement status

All thirteen original v3 comparisons are complete: 62 PASS, 16 INCONCLUSIVE, zero FAIL metric checks. All release bounds held; the strict zero-credit shadow has the same verdicts. Bursty completed90 samples/arm with all six checks PASS; no unchanged run was repeated.

Supported target gains so far are chart-ephemeral CPU/op −0.619% [95% CI −1.077%, −0.093%] and short-generation chart-ephemeral throughput +0.569% [+0.071%, +1.082%]. No RSS saving or memory credit is claimed.

Uncertainty includes main throughput, plain-ephemeral p99, single-worker random-large CPU/throughput, small/8 CPU/faults, Larson/1 CPU/throughput, chart-Larson CPU/throughput/faults/peak RSS, profiler-on CPU/throughput, and sparse-buffer peak/drain RSS. In particular, random-large/1 throughput is −0.818% [−1.268%, −0.312%] and CPU/op +0.885% [+0.156%, +1.700%]; those adverse intervals remain INCONCLUSIVE against the noise gate, not PASS or equality. The full original intervals, samples, binaries and zero-credit checks are retained.

The docs’ automatic limited-ancillary-uncertainty rule does not cover uncertain CPU/throughput controls. The durable archive verifies744 inputs, all39 original candidate datasets plus the baseline-only diagnostic, with zero pending. Same sole reviewer CLEAN. Artifact-only local gate45/45 PASS in88s; committed ZIP hash verified. Explicit acceptance disposition remains pending. No unchanged reruns or altered thresholds are used to change labels.

Final required CI

The final head’s required minimal-lane checks are GREEN, including the Linux memory gate. Full final CI state, explicit memory-gate result and terminal observer log. Earlier full source/platform results remain retained; skipped full-platform jobs are not claimed as re-executed.

Durable evidence

Archive and verifier retain all original raw samples, actual executables and rejected outcomes. Measured source remains b2978df6ae0266e8ebd47f116874fba72a38e340; final head 5e4b32195570928f1d05a1c70d1c164dc73ce0c5 changes only the evidence package and its ignore/binary attributes, proven by path inventory. Source/platform validation is for the measured code; raw sample SHAs are not rewritten.

V3 original performance cohort

Baseline: 2c7fed4edf91cf412c8969cf3cafeb690f0ed3e3. Candidate: b2978df6ae0266e8ebd47f116874fba72a38e340.

13/13 complete original comparisons. Metric counts: 62 PASS, 16 INCONCLUSIVE, 0 FAIL. Counts are not an aggregate performance score.

Changes below are paired percentages with 95% confidence intervals. CPU time is proportional to CPU/op within each fixed-operation workload. Throughput increasing is beneficial; other metrics decreasing is beneficial. A PASS is a regression-gate result, not proof of improvement or equality. No RSS saving or memory credit is claimed. Each same-host comparison stands alone; hosts are not pooled.

Workload / original run Throughput CPU/op Minor faults p99 Peak RSS After-drain RSS
large-class/8 -0.239% [-1.174, +0.653] INCONCLUSIVE -0.205% [-0.439, +0.125] PASS -0.429% [-2.110, +1.739] PASS +0.000% [-0.729, +1.427] PASS -0.005% [-2.551, +0.000] PASS -0.005% [-2.551, +0.000] PASS
large-class-ephemeral/8 +0.048% [-0.329, +0.312] PASS -0.031% [-0.203, +0.089] PASS +0.000% [-0.769, +0.389] PASS +0.547% [+0.000, +1.122] INCONCLUSIVE -0.010% [-0.082, +0.079] PASS -0.182% [-9.626, +0.000] PASS
large-class-ephemeral/8 (chart build) +0.241% [-0.448, +0.872] PASS -0.619% [-1.077, -0.093] PASS -0.381% [-1.149, +0.380] PASS -0.510% [-1.620, +0.982] PASS -0.029% [-2.540, +0.021] PASS -0.022% [-11.358, +0.710] PASS
random-large/8 +0.314% [-0.429, +1.289] PASS -0.679% [-1.130, +0.388] PASS -0.556% [-1.460, +0.377] PASS -0.094% [-2.844, +3.230] PASS -0.555% [-2.114, +1.109] PASS -0.019% [-0.284, +0.019] PASS
random-large-bursty/8 -0.030% [-0.117, +0.112] PASS +0.198% [-0.467, +0.550] PASS -12.387% [-25.371, +19.427] PASS -0.414% [-1.404, +0.651] PASS -0.834% [-2.241, +1.193] PASS +0.603% [-4.200, +2.789] PASS
random-large/1 -0.818% [-1.268, -0.312] INCONCLUSIVE +0.885% [+0.156, +1.700] INCONCLUSIVE +0.000% [+0.000, +0.000] PASS -0.215% [-0.973, +0.555] PASS +0.000% [+0.000, +0.000] PASS +0.000% [+0.000, +0.000] PASS
small/8 (control) -0.019% [-1.833, +1.226] PASS +0.356% [-0.801, +1.850] INCONCLUSIVE +0.000% [+0.000, +0.602] INCONCLUSIVE +0.000% [+0.000, +0.000] PASS +0.000% [+0.000, +0.000] PASS +0.000% [+0.000, +0.000] PASS
larson/1 -0.503% [-1.201, -0.084] INCONCLUSIVE +0.591% [-0.131, +1.296] INCONCLUSIVE +0.000% [+0.000, +0.000] PASS -0.517% [-1.448, +0.705] PASS +0.000% [-0.038, +0.002] PASS +0.000% [+0.000, +0.000] PASS
larson/8 +1.516% [-1.058, +2.958] PASS -0.613% [-2.068, +1.749] PASS +6.779% [-2.890, +26.954] PASS +0.792% [-2.046, +2.989] PASS +0.302% [-1.559, +1.698] PASS +0.069% [-1.044, +1.210] PASS
larson/8 (chart build) +0.039% [-1.164, +0.917] INCONCLUSIVE +0.339% [-0.739, +1.712] INCONCLUSIVE +0.454% [-0.699, +1.370] INCONCLUSIVE +0.000% [-0.552, +0.476] PASS +1.395% [-0.642, +3.391] INCONCLUSIVE -0.030% [-0.270, +0.096] PASS
large-class/8 (profiler on) -0.312% [-0.688, -0.130] INCONCLUSIVE +0.451% [+0.166, +0.687] INCONCLUSIVE +0.061% [-0.185, +0.307] PASS -1.284% [-5.978, +2.658] PASS -0.074% [-0.387, +0.120] PASS -0.096% [-0.416, +0.245] PASS
large-class-ephemeral/8 short generations (chart build) +0.569% [+0.071, +1.082] PASS -0.174% [-1.006, +0.462] PASS -0.386% [-1.481, +0.772] PASS +0.000% [-0.594, +0.546] PASS +0.000% [-2.676, +0.006] PASS +0.000% [-2.676, +0.006] PASS
sparse-large-buffers 64-slot budget/8 (#422) +0.258% [-0.590, +0.799] PASS +0.252% [+0.022, +0.589] PASS +0.187% [-0.392, +1.167] PASS +0.031% [-0.258, +0.275] PASS +0.075% [-1.185, +3.439] INCONCLUSIVE +0.670% [-1.237, +3.582] INCONCLUSIVE

Run integrity

Original run Samples per arm Host CPU p95 release / bound Zero-credit shadow
39746382593 120 AMD EPYC 9V74 80-Core Processor 1120/1300 ms 5 PASS, 1 INCONCLUSIVE, 0 FAIL
39746384622 120 AMD EPYC 7763 64-Core Processor 1050/1300 ms 5 PASS, 1 INCONCLUSIVE, 0 FAIL
39746388712 60 AMD EPYC 7763 64-Core Processor 1050/1300 ms 6 PASS, 0 INCONCLUSIVE, 0 FAIL
39751358216 60 AMD EPYC 9V45 96-Core Processor 1110/1300 ms 6 PASS, 0 INCONCLUSIVE, 0 FAIL
39751362279 90 AMD EPYC 7763 64-Core Processor 1060/1300 ms 6 PASS, 0 INCONCLUSIVE, 0 FAIL
39751366096 120 AMD EPYC 9V45 96-Core Processor 1100/1300 ms 4 PASS, 2 INCONCLUSIVE, 0 FAIL
39751370377 120 AMD EPYC 7763 64-Core Processor 0/1300 ms 4 PASS, 2 INCONCLUSIVE, 0 FAIL
39751374268 120 AMD EPYC 9V74 80-Core Processor 600/1300 ms 4 PASS, 2 INCONCLUSIVE, 0 FAIL
39751378411 60 INTEL(R) XEON(R) PLATINUM 8573C 490/1300 ms 6 PASS, 0 INCONCLUSIVE, 0 FAIL
39751381893 120 AMD EPYC 9V45 96-Core Processor 640/1300 ms 2 PASS, 4 INCONCLUSIVE, 0 FAIL
39751386417 120 AMD EPYC 7763 64-Core Processor 1070/1300 ms 4 PASS, 2 INCONCLUSIVE, 0 FAIL
39751391093 60 AMD EPYC 9V45 96-Core Processor 1100/1300 ms 6 PASS, 0 INCONCLUSIVE, 0 FAIL
39751394764 120 INTEL(R) XEON(R) PLATINUM 8573C 1090/1300 ms 4 PASS, 2 INCONCLUSIVE, 0 FAIL

The first three measurements were not repeated. Remaining ten were dispatched once under the predeclared expansion condition. Null arm, RSS sanity screen, traces, seeds, touch pattern, operation count and thresholds are unchanged. Original raw samples, binary manifests and all four measured executables are retained for each run. Rejected V1/V2 measurements and the separate baseline-only diagnostic remain part of the evidence archive.

Acceptance remains a separate recorded decision. Main-throughput INCONCLUSIVE is outside the automatic ancillary-uncertainty rule in docs/dev-loop.md. No new tolerance is introduced and no INCONCLUSIVE label is converted into PASS.

Supported direction and unresolved risk

Supported direction means the full 95% interval lies on one side of zero. It is separate from the regression gate, which compares costs to measured noise and any permitted credit. Even an adverse supported direction can be PASS or INCONCLUSIVE against that gate. No metric compensates for a different cell.

Workload Metric Supported direction Change / 95% CI Gate
large-class-ephemeral/8 (chart build) cpu s beneficial -0.619% [-1.077, -0.093] PASS
random-large/1 ops/s adverse -0.818% [-1.268, -0.312] INCONCLUSIVE
random-large/1 cpu s adverse +0.885% [+0.156, +1.700] INCONCLUSIVE
larson/1 ops/s adverse -0.503% [-1.201, -0.084] INCONCLUSIVE
large-class/8 (profiler on) ops/s adverse -0.312% [-0.688, -0.130] INCONCLUSIVE
large-class/8 (profiler on) cpu s adverse +0.451% [+0.166, +0.687] INCONCLUSIVE
large-class-ephemeral/8 short generations (chart build) ops/s beneficial +0.569% [+0.071, +1.082] PASS
sparse-large-buffers 64-slot budget/8 (#422) cpu s adverse +0.252% [+0.022, +0.589] PASS

Every unresolved cell

Workload Metric Adverse-change interval Canonical allowance Zero-credit allowance
large-class/8 ops/s [-0.653, +1.174]% 0.710% 0.710%
large-class-ephemeral/8 p99 operation ns [+0.000, +1.122]% 1.097% 1.097%
random-large/1 ops/s [+0.312, +1.268]% 0.459% 0.459%
random-large/1 cpu s [+0.156, +1.700]% 0.669% 0.669%
small/8 (control) cpu s [-0.801, +1.850]% 1.755% 1.755%
small/8 (control) minor faults [+0.000, +0.602]% 0.000% 0.000%
larson/1 ops/s [+0.084, +1.201]% 0.722% 0.722%
larson/1 cpu s [-0.131, +1.296]% 0.772% 0.772%
larson/8 (chart build) ops/s [-0.917, +1.164]% 0.894% 0.894%
larson/8 (chart build) cpu s [-0.739, +1.712]% 1.160% 1.160%
larson/8 (chart build) minor faults [-0.699, +1.370]% 1.168% 1.168%
larson/8 (chart build) peak RSS MiB [-0.642, +3.391]% 1.994% 1.994%
large-class/8 (profiler on) ops/s [+0.130, +0.688]% 0.322% 0.322%
large-class/8 (profiler on) cpu s [+0.166, +0.687]% 0.510% 0.510%
sparse-large-buffers 64-slot budget/8 (#422) peak RSS MiB [-1.185, +3.439]% 2.344% 2.344%
sparse-large-buffers 64-slot budget/8 (#422) RSS 0.5 s after drain MiB [-1.237, +3.582]% 2.683% 2.683%

Local-Gate: v1 tree=9aefd4def4a9dd2472728d9abe267c3cca1e785a secs=67 lanes=lint:run
Ci-Attestation: {"at":1792651390,"gate":"python/all/lint","host":"linux-x86_64","key":"11c60ffeed1f6e34257cc6362a2d8d0075d0bb239638fdb35e03e49b232b0986","lane":"lint","parents":["9ecc974cdc7c1044d22fadbcdfdb2536695f3bef"],"secs":67,"stamp":"2005fafde95991922c5d51848704157d","tree":"9aefd4def4a9dd2472728d9abe267c3cca1e785a","v":1,"via":"run"}
@zackees zackees added the ci-full Opt-in complete platform and release validation on PR SHA label Oct 22, 2026
Local-Gate: v1 tree=5d208c68f8c3270774b9cd7fb517ca9440b26cfd secs=58 lanes=lint:run
Ci-Attestation: {"at":1792653828,"gate":"python/all/lint","host":"linux-x86_64","key":"c500e1cdb053ca2a398ad20a210f6eeccaac7a0e9aa29db2b615314d9b0860a4","lane":"lint","parents":["14ef7ec58a591f400031f388e65c122c89f3fc8b"],"secs":58,"stamp":"29e15268ef4d9360a24cdd4f28e0634c","tree":"5d208c68f8c3270774b9cd7fb517ca9440b26cfd","v":1,"via":"run"}
Local-Gate: v1 tree=fc385abeb61f62540c4595b67eec3b7a6ff0be2f secs=50 lanes=lint:run
Ci-Attestation: {"at":1792656787,"gate":"python/all/lint","host":"linux-x86_64","key":"a514d8f6fe497aa069166e065c7b818d1fecea708573a3a8fc5722a63030ad50","lane":"lint","parents":["52eab5b38deebc3c01135397b945544587f6029f"],"secs":50,"stamp":"b3713470065b4ed6a17593c1632e082d","tree":"fc385abeb61f62540c4595b67eec3b7a6ff0be2f","v":1,"via":"run"}
Local-Gate: v1 tree=30c44cb466fd6272d52430322e80f68ad3f1cbdb secs=88 lanes=lint:run
Ci-Attestation: {"at":1792662371,"gate":"python/all/lint","host":"linux-x86_64","key":"e4a9a94891b7560e5a2a964f3ec5e2ec641a8a249a518f85aca650918053f41a","lane":"lint","parents":["b2978df6ae0266e8ebd47f116874fba72a38e340"],"secs":87,"stamp":"cb542d3f559637e4dd9258b7fe2f43e0","tree":"30c44cb466fd6272d52430322e80f68ad3f1cbdb","v":1,"via":"run"}
@zackees zackees removed the ci-full Opt-in complete platform and release validation on PR SHA label Oct 22, 2026
@zackees

zackees commented Oct 22, 2026

Copy link
Copy Markdown
Owner Author

Owner acceptance — 2026-10-22

The owner explicitly accepted this candidate and directed merge: “Let's go ahead and Merge this, it seems that we've satisfied the goal that we wanted to do.”

Accepted head: 5e4b32195570928f1d05a1c70d1c164dc73ce0c5; measured allocator source: b2978df6ae0266e8ebd47f116874fba72a38e340; fixed baseline: 2c7fed4edf91cf412c8969cf3cafeb690f0ed3e3.

All thirteen original comparisons are complete: 62 PASS, 16 INCONCLUSIVE, zero FAIL. The owner accepts the disclosed uncertainty, including CPU/throughput controls and the adverse intervals described in the full ledger. INCONCLUSIVE labels remain unchanged; this disposition does not establish equality or alter noise thresholds or memory credit. Supported gains are chart-ephemeral CPU/op −0.619% and short-generation chart-ephemeral throughput +0.569%; no RSS saving is claimed. All release bounds held.

Full original ledger · Committed evidence and source identity · Final required CI and memory-gate record.

Source/platform checks and final required checks are green; the same sole reviewer is clean. Both rejected prototypes and their original failed/incomplete measurements remain archived. Temporary measurement files have been cleaned. Merge will preserve the separate C-core and Rust commits, followed by the requested rebase onto origin/main.

@zackees
zackees marked this pull request as ready for review October 22, 2026 15:37
@zackees
zackees merged commit 2365333 into main Oct 22, 2026
66 checks passed
@zackees
zackees deleted the perf/610-retired-search branch October 22, 2026 15:39
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.

perf: reduce retired-page best-fit search overhead

1 participant