Skip to content

Improve the performance of pipeline building#83631

Merged
Algunenano merged 25 commits intoClickHouse:masterfrom
Algunenano:reduce_port_header_memcpy_cont
Jul 16, 2025
Merged

Improve the performance of pipeline building#83631
Algunenano merged 25 commits intoClickHouse:masterfrom
Algunenano:reduce_port_header_memcpy_cont

Conversation

@Algunenano
Copy link
Copy Markdown
Member

@Algunenano Algunenano commented Jul 11, 2025

Changelog category (leave one):

  • Performance Improvement

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

Improve the performance of pipeline building

This PR generalizes the change from #70105 across the whole codebase, reducing the block copies by using shared pointers, aliased to SharedHeader as it's mostly used to keep reference to headers in the pipeline.

This change is tricky and I expect bugs to come out of it because Block::operator bool() exists and it's used frequently, and std::shared_ptr<Block>::operator bool() also exists and it's completely different meaning. Similar issue with the default constructor of both. I'm 100% sure I've missed some places, because I've already found and fixed a few.

Benchmarks

See perf tests. Depends on the query and join algorithm (different pipeline)

Pending

  • Pass tests. I expect several crashes and broken tests iteration before this is mergeable.
  • Add a new performance check

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@Algunenano Algunenano self-assigned this Jul 11, 2025
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Jul 11, 2025

Workflow [PR], commit [d1cb791]

Summary:

job_name test_name status info comment
Stateless tests (amd_asan, distributed plan, 2/2) failure
03221_insert_timeout_overflow_mode FAIL
Stateless tests (amd_coverage,1/6) dropped
Stateless tests (amd_coverage,2/6) dropped
Stateless tests (amd_coverage,3/6) dropped
Stateless tests (amd_coverage,4/6) dropped
Stateless tests (amd_coverage,5/6) dropped
Stateless tests (amd_coverage,6/6) dropped
Performance Comparison (amd_release, master_head, 1/3) error

@clickhouse-gh clickhouse-gh bot added the pr-performance Pull request with some performance improvements label Jul 11, 2025
@Algunenano Algunenano force-pushed the reduce_port_header_memcpy_cont branch from e4c9713 to cad6e2a Compare July 14, 2025 08:45
baibaichen pushed a commit to Kyligence/gluten that referenced this pull request Jul 18, 2025
baibaichen added a commit to Kyligence/ClickHouse that referenced this pull request Jul 18, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
baibaichen pushed a commit to Kyligence/gluten that referenced this pull request Jul 18, 2025
baibaichen added a commit to Kyligence/ClickHouse that referenced this pull request Jul 20, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
baibaichen pushed a commit to Kyligence/gluten that referenced this pull request Jul 20, 2025
baibaichen pushed a commit to apache/gluten that referenced this pull request Jul 20, 2025
* [GLUTEN-1632][CH]Daily Update Clickhouse Version (20250720)

* Fix gtest due to ClickHouse/ClickHouse#83599

* fxi build due to ClickHouse/ClickHouse#83631

* Fix Build due to ClickHouse/ClickHouse#83294

* Fix Build due to ClickHouse/ClickHouse#82881

---------

Co-authored-by: kyligence-git <gluten@kyligence.io>
Co-authored-by: Chang chen <chenchang@apache.com>
kyligence-git pushed a commit to Kyligence/ClickHouse that referenced this pull request Jul 20, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
kyligence-git pushed a commit to Kyligence/ClickHouse that referenced this pull request Jul 21, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
baibaichen added a commit to Kyligence/ClickHouse that referenced this pull request Jul 28, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
baibaichen added a commit to Kyligence/ClickHouse that referenced this pull request Jul 29, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
kyligence-git pushed a commit to Kyligence/ClickHouse that referenced this pull request Jul 29, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
kyligence-git pushed a commit to Kyligence/ClickHouse that referenced this pull request Jul 30, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
kyligence-git pushed a commit to Kyligence/ClickHouse that referenced this pull request Jul 31, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
kyligence-git pushed a commit to Kyligence/ClickHouse that referenced this pull request Aug 1, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
kyligence-git pushed a commit to Kyligence/ClickHouse that referenced this pull request Aug 2, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
kyligence-git pushed a commit to Kyligence/ClickHouse that referenced this pull request Aug 3, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
baibaichen added a commit to Kyligence/ClickHouse that referenced this pull request Aug 7, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
baibaichen added a commit to Kyligence/ClickHouse that referenced this pull request Aug 8, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
baibaichen added a commit to Kyligence/ClickHouse that referenced this pull request Aug 11, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
baibaichen added a commit to Kyligence/ClickHouse that referenced this pull request Aug 12, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
baibaichen added a commit to Kyligence/ClickHouse that referenced this pull request Aug 13, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
baibaichen added a commit to Kyligence/ClickHouse that referenced this pull request Aug 14, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
baibaichen added a commit to Kyligence/ClickHouse that referenced this pull request Aug 15, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
baibaichen added a commit to Kyligence/ClickHouse that referenced this pull request Aug 16, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
baibaichen added a commit to Kyligence/ClickHouse that referenced this pull request Aug 18, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269
lgbo-ustc pushed a commit to bigo-sg/ClickHouse that referenced this pull request Sep 17, 2025
zzcclp pushed a commit to Kyligence/ClickHouse that referenced this pull request Dec 19, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269

(cherry picked from commit 4aeddc5)
zzcclp pushed a commit to Kyligence/ClickHouse that referenced this pull request Dec 25, 2025
Fix rebase issue:
- 20250717 ClickHouse#83631
- 20250529 ClickHouse#80777
- 20250326 ClickHouse#77729
- 20250308 ClickHouse#77269

(cherry picked from commit 4aeddc5)
zzcclp pushed a commit to Kyligence/ClickHouse that referenced this pull request Mar 10, 2026
Fix rebase issue:
  - 20250717 ClickHouse#83631
  - 20250529 ClickHouse#80777
  - 20250326 ClickHouse#77729
  - 20250308 ClickHouse#77269

(cherry picked from commit 4aeddc5)
(cherry picked from commit d2c3ee8)
zzcclp pushed a commit to Kyligence/ClickHouse that referenced this pull request Mar 11, 2026
Fix rebase issue:
  - 20250717 ClickHouse#83631
  - 20250529 ClickHouse#80777
  - 20250326 ClickHouse#77729
  - 20250308 ClickHouse#77269

(cherry picked from commit 4aeddc5)
(cherry picked from commit d2c3ee8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-performance Pull request with some performance improvements 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