Repository navigation
Perf CI: confirm a flagged change only if it reproduces at two of three stack placements - #128022
Conversation
…ee stack placements Since ClickHouse#126977 both perf servers start with ASLR disabled, so every start of a binary puts its thread stacks at the same place. A change that only moves the query threads' frames within their stack pages (on ClickHouse#112928, `ThreadPool` worker frames 32 bytes larger) then reproduces at every restart: `set_in_clustered_keys` ClickHouse#2/ClickHouse#3 were 28-32% slower on arm with an instruction-identical `keys256` probe and equal static TLS, and the confirmation rerun reproduced them (+27.1%, +29.8%), so the shard stayed red. `confirm_changes` now reruns the flagged queries at three placements: the main run's own, and with `glibc.rtld.optional_static_tls` = 512 + 21*64 and 512 + 43*64 for both servers (glibc puts the static TLS block at the top of every thread stack, so all thread stacks move 1344 and 2752 bytes lower). `restart` takes the surplus as an optional argument; without it nothing changes. `eqmed.sql` runs separately per placement, step 5's rule is evaluated per placement, and `query-metric-stats.tsv` gets, per query, an actual placement row on the side of the two-of-three majority (the one farthest from the thresholds), so step 5 and the dashboard check in `performance_tests.py`, which are unchanged, reach the majority verdict. With fewer than three placements measured (a failed restart or rerun, the time budget), the placement 0 row is used, which is the previous behaviour; without it the original verdict stands. The per-placement verdicts go to `placement-verdicts.tsv` and the job log. 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 cold review (5 nits, no blocker or major).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261028-032800 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-5:20261028-030000 |
|
cc @egor-click, could you review this and add the |
|
Workflow [PR], commit [b72e1f1] Summary: ✅
AI ReviewSummaryThe PR reruns flagged performance queries at three thread-stack placements and selects measurements matching the two-of-three verdict, retaining placement 0 when evidence is incomplete. No actionable correctness or reliability findings were identified in commit Final VerdictStatus: ✅ Approve |
637cc25
Related: #112928
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
On #112928, arm 1/6 is red:
set_in_clustered_keys#2 0.0627 -> 0.0806 s, #3 0.1132 -> 0.1492 s, and its rerun after a restart reproduced both (+27.1%, +29.8%). The hotkeys256probe is instruction-identical on both sides and their static TLS sizes are equal (so not #122550). The PR makes bothThreadFromThreadPool::worker()frames 32 bytes larger; a 64-byte stack realignment between them absorbs one, so the probe's frame lands 32 bytes deeper in its stack page, and on arm these queries have a slow mode that follows that position (47 builds in September). Thread stacks start at the same page offset on every start, so the rerun measured the same placement.confirm_changesnow reruns the flagged queries at three placements: the main run's, and withGLIBC_TUNABLES=glibc.rtld.optional_static_tls=1856/3264for both servers, which moves every pool thread stack 1344 / 2752 bytes lower.eqmed.sqland step 5's rule run per placement, and a change is confirmed only if it reproduces at two of the three:query-metric-stats.tsvgets an actual placement row with the majority verdict, leaving step 5 and the dashboard check unchanged. With fewer than three placements, placement 0's row is used, as today. The main run is unchanged. Cost: two more restarts and reruns of the flagged queries, only when something is flagged (15-21 s per confirmation in this job).Validation, local on x86: a harness with fake servers and the real
clickhouse-local,eqmed.sqland dashboard reader demotes a slowdown present at one placement only (current code keeps it blocking) and keeps one present at two or three; a master server started with each surplus moved every thread stack but the main one by exactly 1344 / 2752 bytes. The arm timing at the new placements is inferred, not measured (no arm host).🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/128022]
Version info
26.11.1.849-master(included in26.11and later)