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

fix: fix out-of-memory in tpch q21 #850

Merged
merged 5 commits into from
Apr 19, 2024
Merged

fix: fix out-of-memory in tpch q21 #850

merged 5 commits into from
Apr 19, 2024

Conversation

wangrunji0408
Copy link
Member

@wangrunji0408 wangrunji0408 commented Apr 19, 2024

Signed-off-by: Runji Wang [email protected]

In HashSemiJoinExecutor2, data chunk builder for each key was reserved with 1024 capacity. But they only have 4 rows on average in TPC-Q Q21. Therefore, more than 4*1020*2*1500000 = 12GB memory was wasted.

This PR fixes this bug by using DataChunkBuilder with dynamic capacity. This PR also replaces vectors by boxed slices in array, making sure that unused memory is released after build. Finally, it enables q21 in CI.

run-q21                 time:   [2.6544 s 2.6956 s 2.7059 s]
                        change: [-61.787% -61.416% -61.045%] (p = 0.05 < 0.05)

@wangrunji0408 wangrunji0408 added this pull request to the merge queue Apr 19, 2024
Merged via the queue into main with commit 7d733e6 Apr 19, 2024
5 checks passed
@wangrunji0408 wangrunji0408 deleted the wrj/fix-q21-oom branch April 19, 2024 17:30
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