Repository navigation
Run the polymorphic_parts_m performance inserts on 20 parts - #131896
alexey-milovidov merged 1 commit into
Conversation
No existing query number or text changes: 2 queries are disabled and 2 copies appended as 3 and 4. Queries 0 (wide) and 2 (Buffer) take 1.59 and 2.19 s on MasterCI amd (3.00 and 4.09 s on arm); each writes 100 parts of 100 rows. The copies are the same INSERTs on numbers(2000): 20 parts of the same 100 rows. The compact query (0.28 s) keeps its 100 parts. Local A/B with perf.py on official MasterCI builds, two repetitions on different NUMA nodes, both seat orders (decide.py VERDICT ok, GEN_ARGS 1 1): - per part, copy vs original: time 0.97-1.00x, user time 1.00-1.03x; file opens and buffer allocations per part equal, statistics step present exactly when in the original. - ClickHouse#109000 (7a4e895 -> e523465): the Buffer copy keeps 80-104% of query 2's client-time slowdown (CI: user time 1.38x amd, 1.70x arm). - ClickHouse#109454 (2485f14 -> 45cb837): the wide copy keeps 93-97% of query 0's per-part user time increase (CI: 1.07x amd, 1.06x arm). The ClickHouse#109454 passes ran perf.py with --min-runs 30 --cap 30: at CI's 5-7 runs per server a copy that keeps a 6% effect fully misses it in a third or more of passes. hits_wide receives 20 instead of 100 parts per run from each copy, so a cost that grows with the parts already in the table, rather than per written part, is smaller in the copies. Projected CI medians: 0.32 / 0.42-0.43 s on amd, 0.60 / 0.79-0.80 s on arm; about 31 s of query time per master perf job on amd and 57 s on arm. Related: ClickHouse#129258 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings), plus my own review (0 blocking findings).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261116-030300 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-5:20261116-014700 |
|
Workflow [PR], commit [88bf0d7] Summary: ✅
AI ReviewSummaryPR #131896 replaces the two expensive wide-part and Missing context / blind spots
Final VerdictStatus: ✅ Approve |
755856a
Related: #129258
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Queries 0 and 2 of
polymorphic_parts_m.xml(INSERTs intohits_wideand throughhits_buffer) take 1.59 and 2.19 s on MasterCI amd (3.00 and 4.09 s on arm); the compact one 0.28 s (0.39 s on arm). Each INSERT writes 100 parts of 100 rows, 475 files per wide part of the hits schema, and the Buffer writes every block intohits_widewith its own nested INSERT: the costs the file measures.No existing query number or text changes: 2 queries are disabled and 2 copies appended as 3 and 4. The copies are the same INSERTs on 20 parts of the same 100 rows; the compact query keeps 100 parts. Per part, the copies' local time is 0.97-1.00x and user time 1.00-1.03x their originals'.
On the MasterCI builds before and after #109000 (costlier nested INSERTs; CI: query 2 user time 1.38x on amd, 1.70x on arm), the Buffer copy keeps 80-104% of its original's slowdown. On those of #109454 (statistics per written part; CI: query 0 user time 1.07x on amd, 1.06x on arm), the wide copy keeps 93-97% of its original's per-part user time increase, measured with 30 runs per server, which a 6% effect needs.
hits_widenow receives 20 instead of 100 parts per run from each copy, so a cost growing with the parts already in the table, rather than per written part, is smaller in the copies.The copies should take 0.32 and 0.42-0.43 s on amd, 0.60 and 0.79-0.80 s on arm, saving about 31 s of query time per master perf job on amd and 57 s on arm. The copies restart the history of 2 queries.
Validation:
perf.pyon the final file runs only queries 1, 3 and 4, also with CI's--max-queries 10, no run trend.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/131896]
Version info
26.11.1.2462-master(included in26.11and later)