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

Improve parallel load balance in the interpreter. #2313

Merged
merged 2 commits into from
Sep 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/interpreter/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1534,7 +1534,7 @@ RamDomain Engine::evalParallelScan(
const Rel& rel, const ram::ParallelScan& cur, const ParallelScan& shadow, Context& ctxt) {
auto viewContext = shadow.getViewContext();

auto pStream = rel.partitionScan(numOfThreads);
auto pStream = rel.partitionScan(numOfThreads * 20);

PARALLEL_START
Context newCtxt(ctxt);
Expand Down Expand Up @@ -1709,7 +1709,7 @@ RamDomain Engine::evalParallelIndexScan(
CAL_SEARCH_BOUND(superInfo, low, high);

std::size_t indexPos = shadow.getViewId();
auto pStream = rel.partitionRange(indexPos, low, high, numOfThreads);
auto pStream = rel.partitionRange(indexPos, low, high, numOfThreads * 20);
PARALLEL_START
Context newCtxt(ctxt);
auto viewInfo = viewContext->getViewInfoForNested();
Expand Down Expand Up @@ -1754,7 +1754,7 @@ RamDomain Engine::evalParallelIfExists(
const Rel& rel, const ram::ParallelIfExists& cur, const ParallelIfExists& shadow, Context& ctxt) {
auto viewContext = shadow.getViewContext();

auto pStream = rel.partitionScan(numOfThreads);
auto pStream = rel.partitionScan(numOfThreads * 20);
auto viewInfo = viewContext->getViewInfoForNested();
PARALLEL_START
Context newCtxt(ctxt);
Expand Down Expand Up @@ -1818,7 +1818,7 @@ RamDomain Engine::evalParallelIndexIfExists(const Rel& rel, const ram::ParallelI
CAL_SEARCH_BOUND(superInfo, low, high);

std::size_t indexPos = shadow.getViewId();
auto pStream = rel.partitionRange(indexPos, low, high, numOfThreads);
auto pStream = rel.partitionRange(indexPos, low, high, numOfThreads * 20);

PARALLEL_START
Context newCtxt(ctxt);
Expand Down