Skip to content

chore(bench): add TPC-H harness and GPU/MIG placement - #1738

Draft
aocsa wants to merge 7 commits into
sirius-db:devfrom
aocsa:codex/tpch-mig-benchmark-harness
Draft

chore(bench): add TPC-H harness and GPU/MIG placement#1738
aocsa wants to merge 7 commits into
sirius-db:devfrom
aocsa:codex/tpch-mig-benchmark-harness

Conversation

@aocsa

@aocsa aocsa commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Add one reproducible StarRocks/Sirius TPC-H workflow:

  • a parquet generator, FE/CN launcher, DuckDB oracle, result comparator, and per-CN distribution report;
  • all 22 FILES()-based query texts, including the scale-correct q11 and the CTE-reuse guidance;
  • GPU_DEVICES for shared-GPU development and future MIG_DEVICES launcher plumbing.

cluster8.sh documents the resource contract explicitly: each CN consumes GPU_MEM plus its STAGING arena outside that limit, plus CUDA context overhead. The README now states that an actual multi-CN run still requires #1714's CN bring-up/flags, #1693's stable staging arena, and the follow-on distributed exchange runtime.
It also marks UUID-based MIG_DEVICES unsupported on the current engine because its NVML device-count check fails under UUID-only visibility; use whole-GPU ordinals such as GPU_DEVICES=0,1 on that box for now.

Why one PR

The scripts, query kit, oracle/comparator, and topology launcher form one reproducible measurement and correctness workflow. Splitting them would leave a reviewer unable to run or validate the workflow end to end. The source commits are preserved as six cherry-picks, followed by a documentation-only prerequisite clarification.

Validation

  • pixi run bash -n for gen-tpch.sh, cluster8.sh, and bench.sh
  • pixi run python -m py_compile for cn-distribution.py, compare.py, and oracle.py
  • Comparator fixture: a wrong cold run (r0) is rejected while a correct warm run (r1) passes; the overall comparator exits non-zero.

Known gate limitation, intentionally not changed here: compare.py currently treats nan versus a finite oracle value as a match because its d > tolerance comparison is false for NaN. A focused follow-up should reject non-finite numeric values before using this as a strict correctness gate.

Draft status and runtime scope

This remains a Draft because dev does not yet contain the distributed runtime needed for real multi-CN execution. The harness and documentation are ready to review independently; runtime measurements should wait for the prerequisite series.

aocsa and others added 7 commits September 9, 2026 17:20
… launcher

Plan piece 10, the Q1/Q6 subset of D2a/D2b/D2c; future branches stacked/docs-cn-runbooks,
stacked/bench-tpch-harness-oracle and stacked/bench-cn-distribution. The one-CN-per-GPU proof needs: cluster8.sh,
benchmarks/tpch (bench.sh, q01, q06, README), tools/oracle.py and compare.py from bench/rtxpro6000-2gpu/tools,
gen-tpch.sh and scripts/cn-distribution.py. Fixes over SOT: cluster8.sh unsets an inherited CUDA_VISIBLE_DEVICES
(it beats --gpu-device) and exports SIRIUS_QUERY_WATCHDOG_SECS; bench.sh takes ORACLE_DIR and compare.py exits
non-zero on any mismatch, so a wrong answer fails the sweep; oracle.py spills under $TMPDIR. Drift: README trimmed
to what ships; bench.sh's header drops "all 22" and lazy nixl setup (C7 pre-warms sessions); cn-distribution.py
hints rm -rf .cn*/telemetry/* since clean-telemetry.sh is absent; gen-tpch.sh keeps SOT's /opt/dlami/nvme/tpch
default. Left out: q02-q22, analyze.py, run-comparison.sh, setup-engine-b.sh, QUERY-DEVIATIONS.md, RETARGETING.md
(D2b); BUILDING.md, clean-telemetry.sh, cluster8 -cfg/-numa (D2a); the pinned kit (D3).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The tree carried only q01 and q06; the other twenty lived on the source
branch, so no arm was reproducible from the repo. q02..q22 and
QUERY-DEVIATIONS.md come from perf/profile-sf1000 unchanged, except q11:
its HAVING fraction is now `0.0001 / __TPCH_SF__`, substituted with
$TPCH_SF (default 1) by bench.sh and oracle.py. With the stock constant
the query returns zero rows on both engines at SF1000 (measured, arms
P-2cn and D-on), which compare.py then reported as an EMPTY on both sides.

compare.py compared only the last non-empty run. In arm P-2cn q15's cold
run returned zero rows and its two warm runs one row; the old output hid
the flake behind the warm verdict. Every run is compared now, the
per-query verdict is the worst of its runs, per-run verdicts are printed
when they differ, and the exit status is 0 only when every run matches.

Tested: `bash -n bench.sh`; compare.py on arms/P-2cn against the SF1000
oracle reports q15 as `EMPTY (r0 of 3 runs)` with the three per-run
lines, the other 21 verdicts unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
At SF1000 q11 returns 936,989 rows and thousands share a value, so two
correct engines order the ties differently and the row-order-sensitive
compare reported VALUES-DIFFER on tie order alone (arm W1-1cn: 12,790
mismatched cells, all swapped ties). ps_partkey is unique per output row.
Recorded in QUERY-DEVIATIONS.md with the SF scaling of the fraction.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e = 0)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmarking Work related to benchmarking multi-gpu starrocks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant