Repository navigation
Run the Int128 and UInt256 array_sort_numeric performance queries on a quarter of their rows - #132174
Conversation
…arter of their rows
No existing query number or text changes: 2 queries (20 numbered entries) are disabled and 4 (20
entries) appended, as 26-45. The two `{type}` queries get `disabled="1"`, which stops all ten of
their expansions; the 16 sub-second ones (master's 0-4, 7-14, 17-19) are appended verbatim through
a new `{narrow_type}` substitution, the four over Int128 and UInt256 (master's 5, 6, 15, 16: 1.49-2.43 s
on MasterCI amd, 1.18-1.50 s on arm) through `{wide_type}` on numbers(500000) instead of 2000000.
Each of the four sorts 2M arrays of 32 16- or 32-byte elements on one thread through the typed fast
path of ClickHouse#109832; user time is linear in rows. The copies keep the same 65409-row blocks (8 instead of
31) and the same per-block work. Every run also pays a fixed fault-in of its block after perf.py's
jemalloc purge, as on MasterCI.
Measured with perf.py on the official MasterCI amd builds, 8 pinned cores, two repetitions on
different NUMA nodes (per-row gates with the L3 capped to 30 MiB, 20 runs per server):
- per-row user time copy / original 0.969-1.006; user-time sort share within 0.016;
- kept fraction of a per-row change 0.897-0.950 (fixed part 21-59 ms per run);
- ClickHouse#117346 (clang 23; MasterCI 0.878 amd / 0.913 arm on the UInt256 sort): original 0.911 / 0.916,
copy 0.922 / 0.916; ClickHouse#120808 on the Int128 reverse sort: original 1.045 / 1.046, copy 1.051 / 1.044.
The Decimal128 query (entry 22) stays enabled: its copy kept under half of ClickHouse#120808's effect in one
of four pass measurements (0.42).
Projected copy medians 0.40-0.66 s amd, 0.31-0.41 s arm: about 21 s (amd) and 15 s (arm) less query
time per master perf job.
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; 1 finding), plus my own review (2 findings, both on the PR text, fixed in the description before publication).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-9:20261116-230101 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-7:20261116-214600 |
|
Workflow [PR], commit [a286a97] Summary: ✅
AI ReviewSummaryReduces the four Final VerdictStatus: ✅ Approve |
d0e9ef9
Related: #129258
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
The
arraySortandarrayReverseSortqueries ofarray_sort_numeric.xmloverInt128andUInt256(entries 5, 6, 15, 16) take 1.49-2.43 s on MasterCI amd and 1.18-1.50 s on arm. Each sorts 2M arrays of 32 16- or 32-byte elements single-threaded, through the typed fast path of #109832.No existing query number or text changes: 2 queries (20 numbered entries) are disabled and 4 (20 entries) appended, as 26-45. The marker covers all ten
{type}expansions, so its 16 sub-second ones return verbatim through{narrow_type}; the wide ones run through{wide_type}onnumbers(500000): the same 32-element array blocks, 8 instead of 31. Per row the copies take 0.97-1.01 of the originals' user time, with the same sort share. Each run also pays a fixed 20-60 ms to fault its block in after the harness's jemalloc purge, as on MasterCI, so a copy keeps 0.90-0.95 of a per-row change and moves 3.7 times more than its original if that fixed cost changes.#117346 (clang 23) moved the UInt256 sort by 0.878 on amd and 0.913 on arm MasterCI. Locally, in two repetitions on different NUMA nodes, its copy moved 0.922 / 0.916, the original 0.911 / 0.916; #120808 moves the Int128 reverse sort by 1.045 / 1.046, its copy by 1.051 / 1.044. Per-row numbers with L3 capped to 30 MiB.
The Decimal128 query (entry 22, 1.60 s amd) stays: its copy kept under half of #120808's effect in one of four passes.
Projected copy medians: 0.40-0.66 s amd, 0.31-0.41 s arm; about 21 s (amd) and 15 s (arm) less query time per master perf job. They restart the history of these 20 entries.
Validation: on the final file
perf.pyruns only entries 20-45 (also with--max-queries 10), no run trend.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/132174]
Version info
26.11.1.2539-master(included in26.11and later)