Skip to content

Run the bfloat16 performance test queries on 300 million rows - #129626

Merged
murphy-4o merged 1 commit into
ClickHouse:masterfrom
groeneai:groeneai/perf-bfloat16-disabled
Nov 12, 2026
Merged

murphy-4o merged 1 commit into
ClickHouse:masterfrom
groeneai:groeneai/perf-bfloat16-disabled

Conversation

@groeneai

@groeneai groeneai commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #129258

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Description

From the #129258 audit: the six queries of bfloat16.xml (one template over =, !=, +, -, *, / on numbers(1000000000)) have 14-day master medians of 1.36-1.82 s on the amd perf runner and 0.77-1.60 s on arm.

No existing query number or text changes: 1 query (6 expansions) is disabled and 1 query (6 expansions) is appended. The old query gets disabled="1", so queries 0-5 keep their number and text and stop running. The same six operations are appended on numbers(300000000) as queries 6-11. numbers() is a single stream, so the time is linear in the row count.

All six operations stay: each is its own loop (two comparisons into UInt8, +/-/* into Float32, / into Float64), so none is a duplicate of another.

Measured locally with perf.py (official master release binary, 8 pinned cores, max_threads = 8, 6 old/new pass pairs) and projected onto the CI medians: queries 6-11 should take 0.41-0.54 s on amd and 0.23-0.48 s on arm (arm by the x86 ratio). Each query runs 12 times per perf job (prewarm and 5 runs on 2 servers), so that is about 73 s amd and 46 s arm less per job. Queries 0-5 did not run in any new pass (checked in system.query_log).

Queries 6-11 start a new history. The old queries' master stat_threshold (p90) was at most 0.028, well below the 0.15 change threshold the report applies to a query without history. Both servers of a perf run use the PR's file, so this PR's own perf report shows no "faster" verdict for this test.

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/129626]

Version info

  • Merged into: 26.11.1.2061-master (included in 26.11 and later)

The six queries of `bfloat16.xml` scan `numbers(1000000000)` and take
1.36-1.82 s on the amd CI runner (14-day master medians), above the
0.1-1 s target of the perf test README.

Mark the existing query `disabled="1"` instead of changing it, so its
six expansions keep query numbers 0-5 and their text, and append the
same six operations on `numbers(300000000)` as queries 6-11. `numbers()`
is a single stream, so the time is linear in the row count.

Related: ClickHouse#129258

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@groeneai

groeneai commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author
Internal second-model review (click to expand)

Independent cold review plus Gate B (second model) on b5326d59e4b0: no blocker or major finding, nothing changed in the diff.

  • 💡 PR text only: the saving figure was corrected to the measured 12 runs per query per job (CIDB perf_test_times_v1: prewarm + 5 runs on 2 servers), about 73 s amd and 46 s arm.

@groeneai

groeneai commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. 14-day master medians: all six queries above 1 s on amd (1355-1819 ms), #5 at 1600 ms on arm. Every local old pass shows the same (1.14-1.74 s per query, 8 pinned cores, max_threads = 8).
b Root cause explained? The query scans numbers(1000000000); numbers() is a single stream, so its time is linear in the row count.
c Fix matches root cause? Yes. The same six operations run on 3e8 rows; the old query is disabled instead of changed, so no query number or text changes.
d Test intent preserved / new tests added? Yes. Same operations and order, same single-stream source, same result types (UInt8, Float32, Float64), values still above 2^24. The file is the test; no new test.
e Both directions demonstrated? Old/new perf.py passes on the same release binary, 6 pairs: new/old 0.29-0.31 per operation, projected 0.41-0.54 s amd and 0.23-0.48 s arm. Queries 0-5 never ran in a new pass (system.query_log). CI timing and noise are checked on this PR's perf runs.
f Fix is general across code paths? N/A (no code). The file has one query; all six expansions are handled.
g Fix generalizes across inputs (params/datatypes/wrappers)? N/A (no code).
h Backward compatible? (maintainer-approved exception only) Yes. Queries 0-5 keep their number and text (disabled); 6-11 are new.
i Invariants and contracts preserved? Yes. 6 enabled queries, so --max-queries 10 still runs all of them (measured); no create, fill or settings in the test.

Session id: cron:clickhouse-impl-slot-4:20261105-205400

@groeneai

groeneai commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

cc @egor-click, could you review this and add the can be tested label so CI runs? Following the disabled approach from #129366: the one bfloat16 query (6 operations on numbers(1000000000), 1.36-1.82 s on amd) is disabled, so queries 0-5 keep their number and text, and the same 6 operations are appended on numbers(300000000) as queries 6-11.

@clickhouse-gh

clickhouse-gh Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [b5326d5]

Summary: ✅


AI Review

Summary

The change disables the six original bfloat16.xml query expansions and appends the same operations over 300 million rows, preserving history indices 0–5 and assigning the replacements indices 6–11. No actionable findings in commit b5326d59e4b017d8f2caa4e93647862f4d23ca1f. An offline probe of the actual harness confirmed query expansion, disabled-query handling, and selection of all six replacements with --max-queries 10. The reported six local before/after measurement pairs support the intended runtime reduction.

Missing context / blind spots
  • ⚠️ The current CI reports contain no performance result rows. Runner timings and noise were not independently verified; completed amd and arm performance runs would confirm the projections in the PR description.
Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added pr-ci can be tested Allows running workflows for external contributors comp-testing Test content only (no production code). labels Nov 5, 2026
@murphy-4o
murphy-4o added this pull request to the merge queue Nov 12, 2026
Merged via the queue into ClickHouse:master with commit d92dbee Nov 12, 2026
548 of 550 checks passed
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 12, 2026
@clickhouse-gh clickhouse-gh Bot added comp-data-types Type system & core datatypes used across query planning/execution. and removed comp-testing Test content only (no production code). labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-data-types Type system & core datatypes used across query planning/execution. pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants