Repository navigation
Run the single-threaded prefetch_in_aggregation performance queries on 20 million rows - #129625
Conversation
… rows The two single-threaded `numbers(50000000)` aggregations of this test take 1.1 s (set) and 1.4 s (`count()` map) on amd MasterCI: `numbers()` is one stream, so one thread inserts 5e7 distinct keys, a row count sized for the `numbers_mt` variant of the same `<query>` element. Following the performance-history rule for existing tests (never change, delete or renumber a query), the two `<query>` elements are marked `disabled="1"` and replacements are appended after the last query: `numbers(20000000)` for the set and the `count()` map, plus verbatim copies of the four sub-second expansions the attribute also stops (`numbers_mt` 5e7 set, `count()` on `numbers` / `numbers_mt` 1e7 and `numbers_mt` 5e7), so every case measured today is still measured. Numbers 12 and 13 held the `numbers_mt(1e8)` pair until it moved to 10 and 11, so two disabled placeholders keep them and the new queries start at 14. Indexes 0-11 keep their texts; 6 expansions are disabled, 2 placeholders added and 6 expansions appended (14-19). The 2e7 hash tables are 256 MiB (set, 8-byte cells) and 512 MiB (`count()` map, 16-byte cells): well above L2, where aggregation turns prefetch on, and above the L3 of both CI hosts, so the lookups still miss the caches. Locally the two replacements take 0.41 / 0.43 of the 5e7 time on the same binary. Related: ClickHouse#129258 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review (2 rounds)
|
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-7:20261105-204900 |
|
cc @egor-click, could you review this and add the |
|
Workflow [PR], commit [e9f5b49] Summary: ✅
AI ReviewSummaryPR #129625, head Final VerdictStatus: ✅ Approve. No required changes. |
358b830
Related: #129258
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Part of the #129258 audit (queries over 1 s). The two single-threaded
numbers(50000000)aggregations ofprefetch_in_aggregationtake 1062 ms (set, #4) and 1383 ms (count()map, #8) on amd MasterCI, 862 / 1049 ms on arm (14-day medians): they share their<query>elements with thenumbers_mtvariants, so one thread inserts 5e7 distinct keys.The two elements get
disabled="1". That also stops their four sub-second expansions (#5, #6, #7, #9), so verbatim copies of those are appended together with the two queries onnumbers(20000000). No existing query number or text changes: 2 queries (6 expansions) are disabled and 5 queries (6 expansions) are appended (#14-#19). #12 and #13 held thenumbers_mt(1e8)pair until #129303 moved it to #10/#11, so two disabled placeholders keep those numbers. The appended queries start a fresh history, but their CI threshold stays the same: every threshold this test has learned is below thecompare.shfloors (0.15 / 0.25).The test still measures prefetching: at 2e7 rows the hash tables are 256 MiB (set) and 512 MiB (
count()map), above the L3 of both CI hosts (105 MB m7i, 36 MB m8g), and prefetch still saves 10% / 13% on them locally. On the same official master binary the two new queries take 0.41 / 0.43 of the old time (about 430 / 590 ms on amd, projected).select a|b from t_str_key_*(#0-#3) are also over 1 s on master now, but only because of the libfiu fast-path flag that #129334 resets (67-600 ms without it), so they stay.Validation:
perf.py --print-querieslists the 12 master queries unchanged, then the 2 placeholders and the 6 new ones; localperf.pyruns measured only the 12 enabled queries, and--max-queries 10picked 10 of them.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/129625]
Version info
26.11.1.1484-master(included in26.11and later)