Repository navigation
Description
Description
129 单机 sysbench1000w.nopk_random_point_1000 在相邻 MatrixOne commit 间出现显著性能下降。二分定位的 first bad 为 5453d72b7372a9f77263d1dd4c982e616446d4cb,对应 PR #28955。
Environment
- Branch:
main - Good commit:
db3915689fc9bccfd58a1a05b38b6e5329d43190 - First bad commit:
5453d72b7372a9f77263d1dd4c982e616446d4cb - Deployment: 129 单机、隔离 half-host slot、Sysbench 1000W 数据集
- Case:
sysbench1000w.nopk_random_point_1000 - Threads: 1000
- Measurement duration: 5 minutes
- Date: 2026-09-24
Steps to reproduce
在 mo-auto-test 的 Binary Search On 129 New workflow 上分别运行相邻 commit:
Test_list=sysbench1000wSYSBENCH_TEST_LIST=sysbench1000w.nopk_random_point_1000After_Run=cleanup- 比较最终
transactions ... (X per sec.)
Actual behavior
| Commit | TPS | Result | Evidence |
|---|---|---|---|
db3915689fc9bccfd58a1a05b38b6e5329d43190 |
25,772.01 | Good | run 35959133717 |
5453d72b7372a9f77263d1dd4c982e616446d4cb |
10,274.40 | Bad | run 35956227035 |
相邻 commit 间 TPS 下降 60.13%。相对固定基准 33,637.89 TPS,first bad 下降 69.46%。
两个 workflow 均成功完成;bad run 的 ignored errors 为 0,不是 SQL 报错或未完成测试造成的低值。GitHub compare 显示两个 commit ahead_by=1,中间没有其他 commit。
Expected behavior
同一数据集、拓扑和并发下,TPS 不应在相邻 commit 间下降 60%,且不应超过 25% 性能回归门限。
Stability and controls
- Reproducer: first bad 当前复现 1/1
- Control: 相邻 good 当前通过 1/1
- Fixed baseline: 33,637.89 TPS
- 25% threshold: 25,228.42 TPS
- Data correctness: 两次 case 均成功,
ignored errors=0 - Environment: 二分前已释放 Nightly reservation,并清理占用约 23% CPU 的旧 Fulltext 孤儿进程;有效 run 独占 129 half-host slot
- Follow-up required: 相邻 good/bad 各复跑至少 2 次,并采集 CPU/memory/profile,确认回归稳定性和具体热点
Evidence
- Good: https://github.com/matrixorigin/mo-auto-test/actions/runs/35959133717
- First bad: https://github.com/matrixorigin/mo-auto-test/actions/runs/35956227035
- Later bad boundary:
2243a0b636e18ebae82400246893e796dd4d6a6c, 25,151.78 TPS: https://github.com/matrixorigin/mo-auto-test/actions/runs/35953307266
Code analysis
二分结果将 first bad 定位到 #28955,但该 PR 的声明范围是 Fulltext2 UUID membership probe,与 Sysbench No-PK random point 没有直接功能关系。目前只能确认性能下降与该 merge commit 的边界相关,尚不能仅凭单次结果断言具体代码路径因果,需要结合复跑和 profile 进一步确认。
Regression coverage
修复后应在 129 单机性能回归中持续覆盖 sysbench1000w.nopk_random_point_1000,并以固定环境指纹和 25% 阈值做回归门禁。
Related
- Suspected first-bad PR: fix(fulltext2): avoid boxing loaded UUID membership probes #28955
- First-bad commit: 5453d72
@VioletQwQ-0 请协助确认该提交是否可能影响通用点查执行路径,并结合 profile 排查性能下降原因。
Activity
Fix primary-key runtime filter for index join backfill (#29466)
VioletQwQ-0 commentedon Oct 19, 2026
Handoff — evidence and remaining work (2026-10-19)
Attachment v2: issue29322-handoff-evidence-v2-20261019.zip (15.95 MB). This replaces the earlier compact ZIP, which omitted historical TPS/profile evidence.
SHA256:
ff2cc4e04d44fd8ccfe32de2a5e3f5f91f07bd4b0fa0402f90dd3ae0bd09ab20Historical TPS and actual CPU evidence
Latest recovered complete steady window per listed subject in this investigation; these are historical measurements, not current-main results:
db3915685453d72b0562e8ebae3b2792c62883611d6c7573bab4b328The original Sep 24 report was 25,772.01 vs 10,274.40 TPS. The Sep 28 follow-up pair did not reproduce that 60% fall. Historical semantic checks/zero SQL errors do not establish full result equivalence; differing builds/data/profile contracts also prevent treating all rows as one controlled series. The original #28955 causal claim remains unconfirmed.
There are real CPU profiles: bab4 has three 10-second samples at steady offsets 60/150/240s.
OrderedLinearSearchOffsetByValFactory[uint64].func1accounts for 52.81% / 53.38% / 52.41% flat CPU. Raw pprof, top/caller output, exact ELF hash and BuildID are included. These samples overlap the 6,040.18-TPS window; this is not an unprofiled arm. They identify a historical hotspot, not a measured optimization benefit.Established progress and limits
914959373c3e1fcdd3e404e52448e466694bdaa9has no completed full 10M correctness/TPS/profile milestone. Two personal 100M seed attempts failed (memory guard; then unavailable watchdog observation), leaving no accepted immutable seed. The second observation failure's exact operation remains unknown. Native TPS boundary hooks and candidate ABBA were not completed. Execution was cancelled; 129 remains paused.Package contents and suggested takeover
historical-tps/: seven steady client logs/excerpts, other phase totals, full SHAs/run states and original-source hashes.profiles/: the three bab4 profiles and readable analysis.G/,B/: full selected result/trace/oracle/receipt JSON. Other files contain derived attribution, component failures, exact identities/status, and the inactive code/test patch.MANIFEST.jsonplus offlinepython3 verify.pychecks included bytes, all wire results/receipts, historical TPS values and profile integrity. It does not rederive omitted raw probe aggregates or certify performance qualification. Service logs, database files, binaries and personal-host details are excluded.Next: inspect the existing profiles and prototype first; establish a correct baseline's 1,000-thread TPS and independent CPU profiles on a validated 10M seed, then test one optimization through real SQL under identical conditions. Keep historical regression attribution separate. A validated 10M comparison can support a production Draft; full 100M confirmation and explicitly reauthorized 129 acceptance (two valid steady windows at least 25,228.42 TPS, CI/QA) remain outstanding. This handoff does not close the issue.
daviszhen commentedon Oct 20, 2026
First-appearance analysis — mechanism-fit first-bad candidate, staged confidence (2026-10-19 follow-up)
Based on the Oct-15 G/B controlled replay evidence plus the sanctioned historical series (handoff v2), the collapse can now be bounded and ranked by mechanism fit. Three confidence tiers are kept strictly separate, matching the existing
historical_60_percent_cause: UNCONFIRMEDstance.1. Mechanism fingerprint (decisive, from G/B arms, identical trace/data bytes)
db391568, Sep-17 code)bab4b328, Oct-8 then-main)index_read_calls=0,base_read_calls=0index_read=7,978,base_read=140,812On Sep-17 code this workload never enters the block-level linear match path at all — a structurally different fast shape. On current code every point read degrades into mass linear block search (consistent with
OrderedLinearSearchOffsetByValFactory[uint64].func1≈ 52.8% flat CPU at steady). The regression is loss of the fast reader shape, not a slow query.2. Timeline (measured, sourced from handoff v2 index + nightly artifacts)
db391568(Sep-17 code)5453d72b(same SHA as original first-bad)0562e8eb/ae3b2792(diagnostic branches)c6288361(then-main)bab4b328(then-main)nopk_point_selectstays healthy at 26–27k, so damage is isolated to the random-point linear-search path.3. Staged verdict
Excluded:
5453d72b/ #28955 — same-SHA re-measurement at 25,547.90; mechanism unrelated (fulltext UUID probe).Primary suspect (mechanism-fit), first collapse (25.5k → ~15k, merge window Sep 23–24):
c701ffa4= #29352 (Sep 24, "release completed prepared scan readers"),pkg/sql/compile/scope.go+6 −0:Nil'ing the retained reader on prepared scopes forces the next EXECUTE to rebuild the reader from scratch; if the rebuild loses the preserved filter/pushdown binding state, point reads fall back to the block linear-scan shape observed in the B arm. Triple corroboration: (a) the Sep-29 probe ladder themes (
Probe index scan storage filters,record block filter state,Fix prepared index filter storage pushdown after diagnostic proof,scope prepared rebinding rows to each execution); (b) in-tree fixes aimed at exactly this family — #29462 "restore prepared TPCC filter selectivity" (a36da7f7, Sep 29) and #29466 partial repair (ff53ee2e, Oct 4); (c) the fallback path's CPU hotspot is precisely the block linear search.Same-window candidates not yet excluded (weaker mechanism fit): #29189
b0ab3f29(Sep 23 — changesConstructBlockPKFiltersemantics for invalid base PK predicates; nopk tables are exactly the invalid-PK case), #291003b34a2ee(Sep 23, vector distance domain), #293695d80e0bc(Sep 24 18:53, prepared table-function domains; after the Sep-24 nightly boundary).Second collapse (15k → 3.6k, Sep-30 main): suspects #29513
76862df5(block-filter/expr_optrewrite — the investigator probed this exact commit twice on Sep 30) and/or #29462 blast-radius. Not decidable from current data.4. Minimal pinning experiment (the one remaining gap)
Same slot, paired A/B:
c701ffa4^(parent-chain point after #29189's merge) vsc701ffa4, ≥ 2 steady windows each, immutable seed. The revert surface is 6 lines, risk minimal. A reproduced ~40% delta closes first-bad attribution for the first collapse; the Sep-30 stage needs its own pair (#29513^ vs #29513) afterwards.Bottom line: first appearance = Sep 23–24 merge window, mechanism-primary suspect #29352
c701ffa4; the Sep-30 aggravation is a separate, second event; the original #28955 attribution was noise. Current main remains at ~6k TPS (≈ 18% of the 33,637.89 baseline), so the performance acceptance (two valid steady windows ≥ 25,228.42 TPS) is still unmet.LeftHandCold commentedon Nov 16, 2026
2026-11-16 复核与关闭说明
按维护者本次明确要求,在补充以下复核证据后关闭此 Issue。关闭原因使用
not_planned,不是completed:不表示原性能目标已恢复,也不表示已证明不存在性能问题。 原报告将问题归因于 #28955 的结论没有得到后续受控证据支持,本条不再按该归因继续追踪。1. 最近四轮 129 Main 正式回归确实执行了对应 Case
日期按 Case 实际执行的北京时间计算;以下均为
sysbench1000w的 No-PK random-points,不混用 TKE 或普通 point-select 数据。b9c06b27b0d75009da9d29cabc9b822cd1f5294076edf496四轮都完整执行,并非跳过后的绿灯。当前处于约 7,400–8,100 TPS;没有证明恢复到原报告约 25,000 TPS 的水平。
原二分 Workflow 与最新正式回归锁定同一个 mo-sysbench SHA
1a7886fc7566dfc9fd85a81801f09471151365d3。查询为 binary preparedSELECT id,k,c,pad FROM sbtest1 WHERE k IN (10 个参数),1,000 线程、300 秒。虽然准备了 10 张各 1,000 万行的表,该脚本实际查询sbtest1;1000 指线程数,不是 IN 参数数。冻结脚本最新资源回执为 129 半机独占 Slot、28 个绑定 CPU、Slot 总预算 96 GiB、MO 容器上限 84 GiB。历史与当前不是同一物理数据种子及缓存状态的受控 A/B,不能把跨日期数值差距全部归因于某个 PR。现有行数/聚合合同和零 SQL 错误,也不能替代每条查询结果的独立正确性核验。
2. 近期 PASS 不等于原性能问题已修复
最新发布日志为:
当前值比滚动基线低约 8.35%,因此通过该门限;它不是在检查本 Issue 原固定验收线 25,228.42 TPS。没有发现这条 PASS 的计算错误,但不能拿滚动基线 PASS 证明历史性能恢复。
3. 修复进展和原归因的边界
7fcd9bdff843,其中有昨晚实测版本之后的执行优化;本次没有该 HEAD 的专项实测,不能提前声称这些更新已解决本问题。4. 关闭的含义与后续重新打开条件
本次是维护者要求的停止跟踪决定,不是“性能修复验收通过”。不修改测试、基线、资源配置或本 Issue 其他元数据。
后续若继续追踪,应先固定 SQL、数据、资源和预热条件,并用独立答案确认对照版本与候选版本返回结果一致,再取得至少两次完整 300 秒测量和对应执行计划/CPU profile。出现可重复、正确性等价的性能差距时,可重新打开本 Issue 或按明确机制关联新的 Issue;不要继续沿用未经证实的 #28955 因果结论。原固定基线如不合格,应明确修订验收依据,而非把错误结果的吞吐作为恢复目标。