Repository navigation
Stabilize the mixed_01_clustered queries of the lower_upper_utf8_mixed_ascii performance test - #122728
Conversation
`lowerUTF8`/`upperUTF8` of `mixed_01_clustered` (queries ClickHouse#4/ClickHouse#5) ran at one of two levels per server process in Performance Comparison, about 1900 minor page faults and 2 ms of system time apart, which is ~17% of the 12 ms arm query. That column keeps all its non-ASCII rows in the first block, so it is the only one whose query takes both result reservations of `LowerUpperUTF8Impl`: the non-ASCII path rounds up to a power of two, 16 MiB for a 65536-row block of 128-byte values plus 127 bytes of padding, while the all-ASCII path reserves exactly 8 MiB + 127 bytes. perf.py purges jemalloc before every run, so each run touches its pages afresh. Run the test at the default block size, 65409 rows (`DEFAULT_BLOCK_SIZE`, 65536 minus that padding): a block stays below 8 MiB and both paths get 8 MiB. `mixed_01_block_tail` follows the block size, so its 64 non-ASCII rows are still the last rows of every full block. Row length, block count, query order and every case are unchanged. Local A/A with the official master build and perf.py: the old fixture shows the split in 33 of 40 server processes, the new one in none, and no query of the test moved in 12 complete-test repetitions per fixture. 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 on this head. My own cold review of the diff, done before reading the implementation's evidence, found no blocker or major; its three nits (wording in this description: which columns take both result paths, the 14-day move counts, the system-time delta) were fixed before publication. Session id: cron:clickhouse-review-slot-8:20260928-175900 |
|
Workflow [PR], commit [4705a7e] Summary: ✅
AI ReviewSummaryThis PR adjusts the Final VerdictStatus: ✅ Approve |
Related: #120510
Related: #119790
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not required: CI-only change.
Description
lower_upper_utf8_mixed_ascii #4/#5(lowerUTF8/upperUTF8ofmixed_01_clustered) take one of two times on the same code. On #120510 the dashboard scored#4+18% as a confirmed regression (arm 5/6); master too, arm 6/6 @ce3a5d0e: 12.7 -> 15.2 ms. In 14 days#4moved over 15% in 56 of 1171 arm runs,#5in 43 of 1146, every other query at most twice.Each server process runs
#4/#5at one of two levels, about 4500 or 6450 minor page faults per execution; the high level adds 2 ms of system time on arm (~17% of the 12 ms query), 2.7 ms on amd, same user time.mixed_01_clusteredhas all its non-ASCII rows in the first block, so it is the only column whose full blocks take both result reservations ofLowerUpperUTF8Impl: the non-ASCII path reserves the next power of two, 16 MiB for a 65536-row block of 128-byte values plus 127 bytes of padding, the all-ASCII path exactly 8 MiB + 127 bytes.perf.pypurges jemalloc before every run.I set
max_block_sizeto the default 65409 (DEFAULT_BLOCK_SIZE, 65536 minus that padding): a block stays below 8 MiB and both paths get 8 MiB.mixed_01_block_tailfollows the block size, keeping its 64 non-ASCII rows at the end of every full block. Row length, block count, query order and every case are unchanged.Locally (x86, official master build, CI server config, 20 repetitions of two fresh servers per fixture): with the old fixture 33 of 40 server processes ran
#4/#5at the high level, with the new one none;#4/#5memory now equals#0/#1(17.0 MiB, was 24.6), their client time is 12% lower, and the user CPU of the other six measured queries is within 2%. In 12 complete-test repetitions per fixture no other query moved.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/122728]
Version info
26.10.1.949-master(included in26.10and later)