Repository navigation
Replace the window function performance queries above 1 s with smaller copies - #129627
egor-click merged 1 commit into
Conversation
…r copies Since the `disabled` query marker, an existing perf query keeps its number and text, so each long query is disabled and a copy on smaller data is appended to the same test: - window_functions_ranking: queries 0-10 disabled, 11-21 appended (7000 partitions of 4500 rows instead of 10000, k % 449 keeps about ten ties per value). - window_functions_many_small_partitions: queries 0-6 disabled, 7-13 appended (15000 days of 3000 rows instead of 40000 days). - window_functions_qualify: queries 0-4 disabled, 5-9 appended (16 million rows instead of 30 million, same group size and key multiplicity). - window_functions_sliding_frames: queries 2, 6, 7, 8, 9, 10 disabled, 13-18 appended (smaller WHERE bounds; 9 and 10 on 30 million rows instead of 60 million). - window_functions_streaming: query 1 disabled, 14 appended (numbers(25000000) instead of 40000000). No original query's text or number changes. The four tables that only the disabled queries read (window_functions_ranking, window_functions_small_partitions, window_functions_qualify, window_functions_sliding_parts) are not created any more; the smaller fills are created as <table>_v2. The appended queries project to 0.23-0.71 s on amd and 0.27-0.71 s on arm (local same-binary ratio applied to the CIDB master medians). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
cc @egor-click, could you review this and add the |
|
Workflow [PR], commit [f2f190b] Summary: ✅
AI ReviewSummaryReplaces 30 expensive window-function performance queries with smaller appended equivalents, preserving all 50 original query texts and indices. The fixture changes and disabled-query handling are consistent with the current runner; no actionable findings. Missing context / blind spots
Final VerdictStatus: ✅ Approve. No new inline findings to post. |
|
i am not sure about this part, i think longer tests still make sense if they are good, so time alone shouldn’t be a metric if coverage based selection if tests to run experiment will work, this would not be necessary correct me if i am understanding this pr wrong |
|
You read the selection right: the queries were picked by time, from @ Algunenano's ask to reduce queries above 1 s (#129176, #129258). What they measure is kept: each copy runs the same query on less data with the shape it depends on ( |
f9d56ea
The check of the tests a PR adds or changes (ClickHouse#129330) failed a PR only when a query's time grows run over run on the tested server. A test whose runs are noisy without a trend passed its own PR, and in master_head PR mode the report's own unstable/changed verdict never fails a PR. That is how system_clusters_replicated_databases (ClickHouse#122223) got in: tested-server spread (stddevPop / median of its runs) 0.41-2.1 in its PR, now > 0.5 on both master servers in about 99% of runs and the noisiest test on master. The check now also fails on an unstable query of such a test: - PR changes only files under tests/ and the reference is the performance reference build of the tested master commit's sources (find_prev_build's new third value; a reference of an older commit, as in about a quarter of PR jobs, does not count): both servers run the same code built the same way, so the report's verdict judges the test; fail on changed_fail or unstable_fail of report/all-queries.tsv. A query that failed on the reference server and ran only on the tested one is not in that file; it is judged by the rule below. - Any other PR or reference (code changes, the official-build fallback, or an older reference): the report measures the PR's change, not the test (the floors flag 79% of the heads of the 214 code PRs that changed a perf test in 2026-11-12..21, their own speedups). Fail when stddevPop / median of the tested server's runs is above 0.5 (at least 5 runs). A spread the change causes also fails: after the merge both master servers run that code. The bar 0.5 flags 0.5% of those code-PR heads and 0.2% of quiet tests' master heads (CIDB backtest), and all 4 jobs of ClickHouse#122223. A query the trend check already reports gets only its trend row. The reading loop of find_run_trends moves to read_query_runs, shared by both checks; run_trend_gate becomes changed_tests_gate. Validated locally on downloaded job logs (no test of the test infrastructure): ClickHouse#122223's 4 jobs fail (the old check passes them); the new tests of ClickHouse#129328, ClickHouse#124553, ClickHouse#131203 (code PRs) and the tests-only ClickHouse#130763, ClickHouse#129627 pass; the run-trend output is unchanged on all 1754 tests of 14 jobs. Related: ClickHouse#100759 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Related: #129258
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
From the #129258 audit: the five
window_functions_*tests of #122542 (@ Michicosun) had 23 queries with a master median above 1 s on amd and 6 on arm. Three more move with them:many_small_partitionsquery 3 shares their table,sliding_framesquery 10 sits at 1 s and query 9 shares its table.No existing query's number or text changes: 30 queries are marked
disabled="1", 30 copies on smaller data are appended, and the four tables that only the disabled queries read are not created any more (the smaller fills are<table>_v2). The data shapes stay:window_functions_ranking: 0-10 -> 11-21, 7000 partitions of 4500 rows (was 10000),kmodulus 449 (was 1009) keeps about ten ties per value.window_functions_many_small_partitions: 0-6 -> 7-13, 15000 days of 3000 rows (was 40000 days).window_functions_qualify: 0-4 -> 5-9, 16M rows (was 30M), moduli scaled to keep the keys per row and 100 rows per group.window_functions_sliding_frames: 2 and 6-10 -> 13-18, smaller row bounds; 9 and 10 on 30M rows (was 60M).window_functions_streaming: 1 -> 14,numbers(25000000)(was 40000000).Projected from local same-binary runs (8 pinned cores,
max_threads = 8) onto the 14-day CI medians, the appended queries take 0.23-0.71 s on amd and 0.27-0.71 s on arm. That saves about 3.9 amd and 2.8 arm runner-minutes per master commit in measured runs, not counting the four larger fills. Both perf servers run this PR's files, so its own perf report shows no "faster" verdict; the appended queries start their own history.On CI the 14-day master median per-query
stat_thresholdis about the same at 0.2-0.75 s as at 1-1.5 s (amd 0.013-0.015 vs 0.014, arm 0.007-0.009 vs 0.007).sliding_framesquery 18 (the copy of 10) keeps its rare slow runs, investigated separately.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/129627]
Version info
26.11.1.2138-master(included in26.11and later)