Repository navigation
perf: release performance gate for autoindex + search (budgets, ES floor, rc.99 regression harness) - #2432
Merged
Conversation
…er, engine-ratio budgets
…st 0.5x), absolute index+state backstops, 3 GB node cap for 5gb
…x reported indexed
4 tasks
Owner
Author
|
Xerj Merger made the fix: added an autoindex performance release gate under scripts/perf/. It generates a corpus, runs autoindex against a throwaway node with a fixed memory cap, and compares the results with the budgets in budgets.toml, optionally against a baseline. It's documented in docs/perf-release-gate.md. No workflow files were changed; wiring it into CI is a separate workflow change for the owner. This backs #2433. Merged for rc.100 at the owner's request. |
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.Outdate
2F47
d 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.
Refs #2433 (tracking issue: the workflow YAML and the release.yml change, for Ivan to add).
What
A release performance gate for
xerj autoindexand search, so a build like rc.99 can't ship again (#2421 #2422 #2423 #2424 #2427 #2428).scripts/perf/gen_corpus.py: a deterministic synthetic corpus (logs, jsonl, csv, json, code, markdown, docs), plus 20 queries per surface. It works standalone:python3 scripts/perf/gen_corpus.py --out DIR --size-mb 1024 --seed 2421. 1 GB takes about 23 s.scripts/perf/autoindex_release_gate.sh→gate.py run|eval: starts a node with a fixedXERJ_MAX_PROCESS_MEMORY_MBcap and runsxerj autoindexexactly as a user would (XERJ_DISABLE_FEEDBACK=true). It samples node and client RSS, counts breaker trips, 429 retries and fatal log lines, and measures disk. It restarts the node, then runs 20 uncached queries each through the CLI (xerj search), raw_search, and MCP (xerj_search). It prints a markdown table plusresults.json, writes to$GITHUB_STEP_SUMMARY, and exits 1 if any budget is missed (2 on an environment error).--baseline <prev xerj binary>: runs the previous release on the same corpus and fails on a regression above 20%.--engine-baseline es.json(scripts/perf/es_baseline.py): ES on the same corpus and runner. It bulk-loads with the default dynamic mapping, refreshes and flushes, force-merges to 1 segment, measures size, then runs the same queries. This enables the ratio budgets.scripts/perf/budgets.toml: every budget with a justification, tierssmoke(200 MB) /1gb/5gb(release).docs/perf-release-gate.md.The 1gb tier runs in about 10–15 min on 4 cores when the build is healthy, since the timeout is 15 min.
Nothing under
.github/is changed. The workflow (perf-gate.yml) and therelease.ymlchange are in the tracking issue, ready to paste.Budgets
_bulk) under a 3 GB cap--baselinebinary[ratio.*])The ratio floors come from the ES/Lucene measurement on the same 1 GB corpus (seed 2421), perf-floor
results.md, 2026-10-25:So rc.99 runs at about 0.04–0.07x ES throughput and misses the 0.5x floor by an order of magnitude. In bulk ingest the rc.99 node reached 5.6 GB RSS despite
XERJ_MAX_PROCESS_MEMORY_MB=3072(#2427). The gate's node-RSS check catches exactly that.Local results
These ran on a shared, heavily loaded 8 vCPU / 16 GB box with about 0.4–1 GB RAM free, so I used the smoke tier (200 MB, 2 GB cap). A 1gb rc.99 run was stopped at 38.3% after 661 s (about 0.6 MB/s, 177 breaker trips, node RSS over its 3072 MB cap), and it was on course to hit the 15-min timeout.
rc.99 (
v1.0.0-rc.99) — FAIL (expected)A second rc.99 smoke run failed the same way, except the node died partway through (EAGAIN,
best-effort helper thread was not started… memory). Every search then errored.main (
4a5de64c, 2 commits behind8e61fc8cwith no engine changes) — FAIL, partly confoundedCaveat: the main node was killed by the host's global OOM killer at 1.84 GB anon RSS, which is under its 2 GB cap, because the shared box was out of RAM. So the "completes" and search rows aren't a fair verdict on main. The rows that do hold up against rc.99:
A clean runner (CI) will give the real main verdict.
Notes
index_bytesfor ES is defined after a force-merge: the refreshed size depends on the segment count (1.77x vs 1.42x source).smoketier with a 2 GB ES heap, or a larger runner.--disable-feedback+XERJ_DISABLE_FEEDBACK=true).