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

Skip hash bucketing for small partitions #264

Merged
merged 4 commits into from
Feb 26, 2024
Merged

Conversation

rkenmi
Copy link
Member

@rkenmi rkenmi commented Feb 20, 2024

This PR adds a feature to skip hash bucketing if the user-supplied hash bucket count is set to 1.

Changes

  • If hash bucket count is set to 1, delta file envelopes are loaded into the merge step directly to compact tables
  • Since the merge step could be dealing with delta file envelope object refs (remote) or pure delta file envelopes (local), an abstraction layer is added for delta file envelope retrieval during invoke by merge.

Initial Benchmarks

Input Delta Size Default Run 1 (secs) Default Run 2 (secs) Default Run 3 (secs) Default Avg. (secs) Skip HB Run 1 (secs) Skip HB Run 2 (secs) Skip HB Run 3 (secs) Skip HB Avg. (secs) Skip HB % Improvement
1.2 GB 196.80 194.44 194.91 195.38 80.54 79.88 78.95 79.79 59.16%
1.7 GB 231.34 215.52 251.69 232.85 117.79 113.73 117.22 116.25 50.08%
3.5 GB 259.40 304.18 264.16 275.91 249.14 257.83 231.42 246.13 10.79%
6.5 GB 377.45 349.44 336.23 354.37 377.27 369.76 305.44 350.82 1%

Copy link
Collaborator

@raghumdani raghumdani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality wise, looks good. I think a bit of refactoring is needed to ensure it's easier to maintain this code in future.

deltacat/compute/compactor_v2/compaction_session.py Outdated Show resolved Hide resolved
deltacat/compute/compactor_v2/compaction_session.py Outdated Show resolved Hide resolved
deltacat/compute/compactor_v2/model/merge_file_group.py Outdated Show resolved Hide resolved
deltacat/compute/compactor_v2/model/merge_file_group.py Outdated Show resolved Hide resolved
deltacat/compute/compactor_v2/model/merge_file_group.py Outdated Show resolved Hide resolved
deltacat/compute/compactor_v2/steps/merge.py Outdated Show resolved Hide resolved
deltacat/compute/compactor_v2/steps/merge.py Show resolved Hide resolved
deltacat/compute/compactor_v2/steps/merge.py Outdated Show resolved Hide resolved
deltacat/compute/compactor_v2/steps/merge.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@raghumdani raghumdani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good mostly. Couple of minor comments.

deltacat/compute/compactor_v2/compaction_session.py Outdated Show resolved Hide resolved
deltacat/compute/compactor_v2/steps/merge.py Show resolved Hide resolved
deltacat/compute/compactor_v2/steps/merge.py Show resolved Hide resolved
deltacat/compute/compactor_v2/steps/merge.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@raghumdani raghumdani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rkenmi rkenmi merged commit eb52217 into ray-project:main Feb 26, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants