Repository navigation
Conversation
…parison perf.py profiles every query whose time changed for --profile-seconds with the query profilers at 10 ms and allocation sampling into trace_log, which gives 300K-500K trace_log rows per flush. trace_log symbolizes every frame in the flush thread by default (symbol lookup, demangling and DWARF line lookup per frame), and both perf servers are pinned to the same 8 CPUs, so that thread takes seconds of CPU from the query measured next. On ClickHouse#131393 (ef42356, shard 6/6) the trace_log flushes cost Block = 292 s / 279 s per server against Insert = 13 s, and group_by_fixed_keys ClickHouse#22, which does the same work every run, has OSCPUWait 46-55 ms in runs 0-3 and 0.7-1.3 s in runs 4-6 while the two servers flush, so the run-trend check reports "time keeps growing with each run". The report never reads the symbols: compare.sh dumps only `trace` and resolves the names itself through addressToSymbol/addressToLine, and the stacks tables, the flame graphs and perf_flamegraph_stacks_v1 are built from that. So disable `trace_log.symbolize` in the perf config, as tests/config/config.d/trace_log_no_symbolize.xml does for the sanitizer and coverage functional jobs. Both servers get it: the left config is a copy of the right one. The key exists since 25.1. Trade-off: the perf servers' trace_log rows exported to the CI Logs cluster have empty `symbols`/`lines`, as in those functional jobs. Measured on the reference binary of that job with perf.py's profile-run settings: the largest trace_log flush went from Block=4733ms (433K rows) to Block=133ms, Insert=113ms (359K rows); SYSTEM FLUSH LOGS from 2.1-5.0 s to 0.2 s; addressToSymbol still resolves every row. Related: ClickHouse#131393 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 cold review (0 findings).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261120-021700 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-6:20261120-014700 |
|
Workflow [PR], commit [0493157] Summary: ✅
AI ReviewSummaryDisables Consumers checked for the resulting empty
Final VerdictStatus: ✅ Approve |
Related: #131393
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Performance Comparison (amd_release, ...)fails withQuery <test> #<i> time keeps growing with each runon queries that do the same work every run: 8 times in 30 days (e.g. 1, 2, 3), 4 of them on #131393.perf.pyprofiles every query whose time changed for 10 s, with the query profilers and allocation sampling intotrace_log: 300K-500K rows per flush.trace_logsymbolizes every frame in the flush thread by default, and both servers are pinned to the same 8 CPUs, so that thread takes seconds of CPU from the query measured next. In [1], thetrace_logflushes costBlock= 292 s / 279 s per server (Insert13 s), andgroup_by_fixed_keys#22, with flatUserTimeandread_rows, hasOSCPUWait46-55 ms in runs 0-3 and 0.7-1.3 s in runs 4-6, while the two servers flush.The report never reads those symbols:
compare.shdumps onlytraceand resolves names withaddressToSymbol. So this sets<trace_log><symbolize>false</symbolize></trace_log>in the perf config, astests/config/config.d/trace_log_no_symbolize.xmldoes for the coverage and sanitizer jobs. Both servers get it (the left config is a copy of the right one). Trade-off: the perf servers'trace_logrows exported to the CI Logs cluster have emptysymbols/lines, as in those jobs; the exportedperf_flamegraph_stacks_v1stacks keep their resolved names.Validation, on the reference binary of [1] with
perf.py's profile-run settings: the largesttrace_logflush went fromBlock=4733ms(433K rows) toBlock=133ms, Insert=113ms(359K rows), andaddressToSymbolstill resolves every row.This removes a cause of the false trips; #132631 changes the check.
Workflow [PR]
Sync PR [sync-upstream/pr/133126]