Skip to content

Disable optimize_uniq_exact_radix_partitioning by default - #127675

Closed
alexey-milovidov wants to merge 1 commit into
masterfrom
disable-radix-uniq-exact-by-default
Closed

alexey-milovidov wants to merge 1 commit into
masterfrom
disable-radix-uniq-exact-by-default

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Disable optimize_uniq_exact_radix_partitioning (#123552) by default until it is fixed for machines with many cores.

The radix-partitioned keyless uniqExact is several times faster with up to 16 threads, but 2-3x slower on machines with 192 threads. ClickBench Q5 SELECT COUNT(DISTINCT UserID) FROM hits, the daily runs before (2026-10-20) and after (2026-10-21) the merge:

machine vCPUs Q5
c6a.4xlarge 16 0.219 → 0.077 s
c8g.4xlarge 16 0.223 → 0.073 s
c6a.metal 192 0.065 → 0.139 s
c7a.metal-48xl 192 0.065 → 0.178 s
c8g.metal-48xl 192 0.044 → 0.133 s

The details are in #127674. The setting is new in 26.11, which is not released yet, so the entry in the settings history is changed in place. The performance test uniq_exact_radix_partitioning now enables the setting explicitly, so that it keeps testing the radix path; the other tests of it already do.

cc @Algunenano

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

🤖 Generated with Claude Code


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

It is faster with up to 16 threads, but 2-3x slower on machines with
192 threads: #127674

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [dcfddad]

Summary: ❌

job_name test_name status info comment
Performance Comparison (arm_release, master_head, 3/6) FAIL Performance dashboard
uniq_hits_no_key #9 FAIL dashboard
uniq_hits_no_key #5 slower query history
uniq_hits_no_key #8 slower query history

AI Review

Summary

PR #127675 disables optimize_uniq_exact_radix_partitioning by default to mitigate the documented performance regression on machines with 192 threads, updates its unreleased 26.11 settings history, and preserves explicit opt-in coverage in the performance test. No actionable findings.

Final Verdict

Status: ✅ Approve.

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Oct 24, 2026
@clickhouse-gh clickhouse-gh Bot added the comp-aggregation GROUP BY / aggregation framework (hash tables, spilling, external aggregation). label Oct 24, 2026
@clickhouse-gh

clickhouse-gh Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing dcfddaddc with master a017407d3 (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of 310191b4f; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

7 translation units recompiled, 16 s compile time in total, 7 of them have a recent master baseline.

Job report

@Algunenano

Copy link
Copy Markdown
Member

The fix for many threads is in #127252 (green and ready to merge)

@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Thanks, @Algunenano. If #127252 lands first and fixes the slowdown on machines with 192 threads, this PR is no longer needed and can be closed. That decision is for a human, so I'm leaving this PR open as a fallback in case 26.11 has to ship before #127252 is merged.

About the red CI: the only failure is Performance Comparison (arm_release, master_head, 3/6), on uniq_hits_no_key #9 (uniqExact(UserID), 0.045 s -> 0.105 s). That slowdown comes from this PR: the comparison baseline is master, where the radix path is on by default, and this PR turns it off on a 16-thread CI machine, where the radix path is faster. Nothing in the code needs fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-aggregation GROUP BY / aggregation framework (hash tables, spilling, external aggregation). pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants