Skip to content

Limit warmed matcher participation to available work chunks - #1051

Merged
helly25 merged 3 commits into
mainfrom
perf/useful-match-workers
Nov 2, 2026
Merged

helly25 merged 3 commits into
mainfrom
perf/useful-match-workers

Conversation

@helly25

@helly25 helly25 commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Reduce overhead when a persistent matcher pool handles a short tail after a larger batch. Keep useful read concurrency, existing worker creation and output ordering.

AG;DR

  • Keep four-entry dynamic chunks and current serial/creation admission. A batch activates at most one retained worker per chunk; every thread remains available for later batches.
  • Give workers stable IDs and keep eligibility fixed throughout each generation. Only participants decrement completion; stop wakes all retained workers, including inactive ones.
  • Exercise growth, 64-entry batches retaining twelve useful workers, 16/32-entry tails, empty batches, regrowth, inline tails and destruction with inactive workers. The regression records actual reader thread IDs.
  • Add an explicit manual warmed-tail benchmark and a controlled delayed-read variant. Reject the alternative that applies the creation quota to each batch: it wins cheap kernels but slows delayed reads about 95-294%.
  • Measure clean ThinLTO release executables on this macOS ARM64 machine and Linux x86-64 drogon. Each host has 49 native cases x three sessions, 18 in-memory cells x three sessions, and four controlled-latency cells x three sessions. Sampling retains the fastest seven of nine, with rotating participant order and native output oracles. Linux timing pins CPU allowances; macOS has no affinity guarantee.
  • The selected 16-entry/ten-worker warmed kernel improves about 31% Linux / 51% macOS. Delayed-read concurrency stays effectively unchanged. Native gains are modest and some controls are slower: retain five-session confirmations with a duplicate-baseline participant, including Linux filter costs up to about 4.13%. Do not project the kernel improvement onto whole-command throughput.
  • Preserve initial/rejected/invalid-delay experiments and exact source/binary identities in the lossless evidence archive; explain the fixture correction explicitly. Link the report from the existing O11/JC checklist and release site. O12 adapter simplification and stage scheduling remain separate.

Validation: complete core/extension release suites pass 306/306 on both hosts, with required Linux FUSE mounts; focused macOS ASan and Linux TSan each pass three suites. Six affected translation units pass local scoped clang-tidy. Normal enforcing hooks and pushed-head CI are required before merge.

Based on merged #1050 (2d615ea1e447e55c266a47799ad6cd64bd4e246d). The synchronization has exactly the locally verified tree; the recorded measurement parent has exactly the merged #1050 tree. Current pushed-head CI remains authoritative.

@helly25
helly25 merged commit d903ea9 into main Nov 2, 2026
32 checks passed
@helly25
helly25 deleted the perf/useful-match-workers branch November 2, 2026 11:07
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