You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Systematically reduce UT Testing job wall time without weakening coverage #27705
The UT Testing job on run 33027514878 / job 98372273909 took 63m48s wall time. The make ut portion took 61m43.659s while using only about 3.73 aggregate CPU cores on an 8-core runner.
Measured critical path:
Phase
Wall time
Native/third-party/CGo preparation
5m03s
Smoke/preparation
28s
Light race packages
18m56s
Exclusive race packages
14m43s
Embedded-cluster race packages
10m24s
Resource-heavy + engine shards
8m43s
Plan build/discovery/tests
2m48s
Report analysis
39s
The runner already receives UT_PARALLEL=8, but native dependencies and CGo are still built serially before tests. The analyzed job spent about 4m22s in third-party compilation and another 33s in CGo compilation.
The same job reached about 17.18 GB cgroup peak memory with memory.events max=9, so increasing race-test concurrency globally is unsafe.
Goal
Systematically reduce UT wall time without changing:
test inventory or package selection;
race detector coverage or repetition;
coverage collection and reporting;
assertions, fixtures, timeouts, or product behavior;
serialized admission required by embedded clusters and fixed-port tests.
Work plan
Reuse the explicit UT CPU budget for native compilation before race tests start.
Remove duplicated setup/report work where the owning CI contract permits.
Reclaim idle slots only in phases with measured memory headroom and deterministic cancellation/report merging.
Optimize repeated expensive fixtures only with an explicit oracle/coverage map; do not merge non-orthogonal scenarios or add t.Parallel to shared mutable fixtures.
Validate each slice with same-commit A/B wall time, exact test/race/coverage equivalence, and cgroup memory evidence.
First-slice evidence
On the same commit and machine, a clean native build changed from 80.43s serial to 18.92s and 17.75s with bounded parallelism. Serial and parallel libmo.so / libmo.a hashes are identical, forced build failures still propagate, and CGo-direct/transitive link tests pass.
First optimization slice is available in #27706. It parallelizes native third-party/CGo preparation using the existing UT CPU budget and adds an opt-in to avoid duplicate package-graph verification. The companion workflow change is matrixorigin/CI#433.
Measured same-commit native A/B: 80.43s serial -> 18.92s / 17.75s parallel, with identical libmo hashes and passing CGo link tests. The config de-duplication removes an additional measured 28.158s while retaining the separately timed proxy canary.
Activity
XuPeng-SH commentedon Aug 27, 2026
First optimization slice is available in #27706. It parallelizes native third-party/CGo preparation using the existing UT CPU budget and adds an opt-in to avoid duplicate package-graph verification. The companion workflow change is matrixorigin/CI#433.
Measured same-commit native A/B: 80.43s serial -> 18.92s / 17.75s parallel, with identical
libmohashes and passing CGo link tests. The config de-duplication removes an additional measured 28.158s while retaining the separately timed proxy canary.ci: parallelize native builds in UT jobs (#27706)
ci: parallelize native builds in UT jobs (matrixorigin#27706)
ci: parallelize native builds in UT jobs (matrixorigin#27706)
ci: parallelize native builds in UT jobs (matrixorigin#27706)
test(plan): reduce redundant legacy session proof work (#31590)
test: shorten planner race critical path with bounded sharding (#31593)
perf(ci): parse UT setup reports once (#32762)