Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] adaptive enable the exchange compression #54956

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

murphyatwork
Copy link
Contributor

@murphyatwork murphyatwork commented Jan 10, 2025

Why I'm doing:

What I'm doing:

Change the default value of the variable transmission_compression_type from NO_COMPRESSION to AUTO, which means:

  1. Compression will be automatically enabled if it is determined to be beneficial.
  2. The current compression codec used is LZ4.

Rationale:

  1. Profitability in Network-Intensive Workloads:
    For workloads that involve transferring large amounts of data, such as shuffling, network bandwidth can become a bottleneck. In such cases, data compression can significantly improve performance.
  2. Complementing Existing Encoding:
    While StarRocks already employs data encoding techniques to reduce data size, there are specific scenarios where additional compression can further optimize data transmission.
  3. Adaptive strategy using Thompson Sampling
    The effectiveness of compression depends on various factors, such as data type, data distribution and network utilization. Therefore, it is preferable to adopt an adaptive strategy rather than relying on a hard-coded approach. In this case, we utilize Thompson Sampling, a reward-based algorithm that dynamically adjusts decisions based on observed outcomes.

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.4
    • 3.3
    • 3.2
    • 3.1
    • 3.0

@wanpengfei-git wanpengfei-git requested a review from a team January 10, 2025 10:26
@murphyatwork murphyatwork force-pushed the murphy_opt_exchange_compress branch from bc15ba8 to 4bd1e16 Compare January 10, 2025 10:30
@murphyatwork murphyatwork enabled auto-merge (squash) January 10, 2025 12:38
Copy link

[BE Incremental Coverage Report]

fail : 3 / 42 (07.14%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 be/src/exec/pipeline/exchange/exchange_sink_operator.cpp 0 21 00.00% [401, 402, 403, 404, 406, 446, 676, 677, 678, 680, 695, 711, 712, 713, 715, 716, 736, 737, 738, 744, 745]
🔵 be/src/util/runtime_profile.h 0 1 00.00% [738]
🔵 be/src/serde/compress_strategy.cpp 0 15 00.00% [24, 26, 28, 32, 33, 34, 35, 37, 41, 42, 43, 45, 46, 48, 49]
🔵 be/src/serde/encode_context.cpp 2 4 50.00% [54, 55]
🔵 be/src/util/compression/block_compression.cpp 1 1 100.00% []

Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 2 / 2 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/qe/SessionVariable.java 1 1 100.00% []
🔵 com/starrocks/common/util/CompressionUtils.java 1 1 100.00% []

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

Successfully merging this pull request may close these issues.

2 participants