Repository navigation
Remove the disabled-optimization baseline arms from the preimage performance test - #122156
Conversation
…ormance test The three `optimize_time_filter_with_preimage = 0` arms run the query with the optimization under test disabled, which makes each a single-threaded full scan of a 50M-row table (arm p50 384/560/446 ms against 78/76/142/83 ms for the other four). Over 30 days on `Performance Comparison (arm_release, *)` they produced 339 of the test's 356 `slower` verdicts, 259 of 260 `unstable` verdicts and all 21 verdicts on true master, where both sides run identical code. One of them, `ClickHouse#4`, is tiered `confirmed_regression` by the dashboard and fails the shard on unrelated pull requests. Detection is unaffected: the harness compares the same query index between the old and the new build, never one arm against another, so the `= 1` arms were always the detector. If the rewrite stopped applying they would move by 3.9x to 5.4x against measured p99 ratio ceilings of 1.040 to 1.173.
Internal second-model review: no blocking findingsTwo independent reviews of this diff (a cold code review and a separate second-model gate) found
💡 The two-sided spread is the part I would look at first if the "reported slower" verdicts look |
|
Workflow [PR], commit [2dffc88] Summary: ✅
AI ReviewSummaryThis PR removes the three Missing context / blind spots
Final Verdict✅ No review findings. |
…ance test With `optimize_rewrite_like_perfect_affix=0`, every row of the fixture matches, so `MatchImpl` calls the dispatched StringZilla `sz_find` once per row, 10M times per query. On amd the cost of that call varies by 5-10% between binaries and between server processes (the red run's extra CPU samples are all in `sz_find_skylake`), so over 30 days the old/new ratio of `#0` crossed 15% in 29 of 1,193 master-vs-master runs and 26 of 1,316 PR runs (median 1.001), and reddened `Performance Comparison (amd_release, master_head, 2/6)` on unrelated ClickHouse#122420 (+20.9%, +17.2% after restart). `ClickHouse#2` behaves the same. The rewrite-on arms never crossed 15% on amd (0 of 2,518, p99 1.109 / 1.081). The harness compares the same query index across builds, never one arm against another, so the `=1` arms are the detector for the rewrite: if it stopped applying they would get 1.6x to 1.7x slower. The rewrite-off LIKE path stays measured by the two `optimize_rewrite_like_perfect_affix = 0` arms of `regexp_anchored_literal.xml` (0 runs above 12% in over 1,050 amd runs each), and correctness by `03594_like_perfect_affix_rewrite_pass`. Same shape as ClickHouse#122156. The survivors renumber to #0/ClickHouse#1, so their learned thresholds reset to the 0.15 floor, which is above their p99. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Related: #101039
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Test-only change, no changelog entry required.
Description
Requested by @ alexey-milovidov on #101039:
optimize_time_filter_with_preimage #4reported slower.Failing job: https://github.com/ClickHouse/ClickHouse/actions/runs/35802337557/job/107121827880
Report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=101039&sha=8112f66ad1a46b94d0af1a745b26caae83eac90a&name_0=PR&name_1=Performance%20Comparison%20%28arm_release%2C%20master_head%2C%201%2F6%29
#4went 0.5476 s to 0.682 s (+24.5%), the only row that failed the shard. It also reds trunk with no pull request involved, for example on master: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=fbb92cbacecdd22ddcfc8cf8553be549642da2e9&name_0=MasterCI&name_1=Performance%20Comparison%20%28arm_release%2C%20master_head%2C%203%2F6%29Root cause. Three of the seven timed queries carry
optimize_time_filter_with_preimage = 0, opting out of the optimization under test. Disabled, each is a single-threaded scan of 25M to 50M rows (arm p50 384/560/446 ms against 78/76/142/83 ms for the other four), 79% of the test's runtime. Long single-threaded scans swing widely on arm runners: over 30 days onPerformance Comparison (arm_release, *)they hold 339 of this test's 356slowerverdicts, 259 of 260unstable, and all 21 on true master, where both sides run identical code.#4alone gave 91, over 80 pull requests.Change. I delete those three arms. Detection is unaffected: the harness compares the same query index between the old and the new build, never one arm against another, so the
= 1arms were always the detector; if the rewrite stopped applying they would move 3.9x to 5.4x against p99 ratio ceilings of 1.040 to 1.173. I change the arm rather than the tiering that classified it: that threshold is not in this repository.Paired
= 0/= 1arms appear in 28 of 673 perf tests; this is not a sweep, these three are just the file's slowest by 5x.Cost: the survivors renumber, so three of the four fall back to the in-tree 0.15 threshold until history rebuilds; their p99 ratios are 1.181, 1.040 and 1.049.
#0and the range query have each since been tiered once near +18%, at 76 to 78 ms where timer granularity dominates.Related: #121456 tracks sibling instances of this class.
Workflow [PR]
Sync PR [sync-upstream/pr/122156]
Version info
26.10.1.1078-master(included in26.10and later)