Add parallel memset when building hash join table#16172
Merged
Mytherin merged 4 commits intoduckdb:mainfrom Feb 13, 2025
Merged
Add parallel memset when building hash join table#16172Mytherin merged 4 commits intoduckdb:mainfrom
Mytherin merged 4 commits intoduckdb:mainfrom
Conversation
Author
|
Btw I think I found a logical bug when deciding if use parallel hash join table finalize, and I fix it in the second commit. |
lnkuiper
requested changes
Feb 11, 2025
Collaborator
lnkuiper
left a comment
There was a problem hiding this comment.
Thanks for the PR! This is a great idea. I saw this showing up in profiling a few times already, and this should really help cases when there are very large join hash tables :)
Maybe we can distribute the workload of the parallel memset slightly better, so I have one minor comment:
lnkuiper
approved these changes
Feb 12, 2025
Collaborator
lnkuiper
left a comment
There was a problem hiding this comment.
Thanks for the changes! This is good to go.
Collaborator
|
Thanks! |
Antonov548
added a commit
to Antonov548/duckdb-r
that referenced
this pull request
Feb 27, 2025
Add parallel memset when building hash join table (duckdb/duckdb#16172)
krlmlr
pushed a commit
to duckdb/duckdb-r
that referenced
this pull request
Mar 5, 2025
Add parallel memset when building hash join table (duckdb/duckdb#16172)
krlmlr
added a commit
to duckdb/duckdb-r
that referenced
this pull request
May 15, 2025
Add parallel memset when building hash join table (duckdb/duckdb#16172)
krlmlr
added a commit
to duckdb/duckdb-r
that referenced
this pull request
May 15, 2025
Add parallel memset when building hash join table (duckdb/duckdb#16172)
krlmlr
added a commit
to duckdb/duckdb-r
that referenced
this pull request
May 17, 2025
Add parallel memset when building hash join table (duckdb/duckdb#16172)
krlmlr
added a commit
to duckdb/duckdb-r
that referenced
this pull request
May 18, 2025
Add parallel memset when building hash join table (duckdb/duckdb#16172)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I found that when the number of threads and tables are both large, single-threaded memset (fill_n) becomes a bottleneck for hash joins. Therefore, I added parallel memset functionality. The following are the test results using 16 threads on TPCH with a scale factor of 30, the machine having 2x Intel(R) Xeon(R) Platinum 8474C @ 2.10GHz and 512GB of memory.