-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: Avoid small batches in Exchange #12010
Conversation
This pull request was exported from Phabricator. Differential Revision: D67615570 |
✅ Deploy Preview for meta-velox canceled.
|
Summary: X-link: facebookincubator/velox#12010 Prevent exchange client from unblocking to early. Unblocking to early impedes effectiveness of page merging. When the cost of creating a vector is high (for example for data sets with high number of columns) creating small pages can make queries significantly less efficient. For example it was observed that when network is congested and Exchange buffers are not filled up as fast query may experience CPU efficiency drop up to 4x: T211034421 Differential Revision: D67615570
d634e88
to
ebd2e0b
Compare
This pull request was exported from Phabricator. Differential Revision: D67615570 |
Summary: Prevent exchange client from unblocking to early. Unblocking to early impedes effectiveness of page merging. When the cost of creating a vector is high (for example for data sets with high number of columns) creating small pages can make queries significantly less efficient. For example it was observed that when network is congested and Exchange buffers are not filled up as fast query may experience CPU efficiency drop up to 4x: T211034421 Differential Revision: D67615570
ebd2e0b
to
54f4247
Compare
This pull request was exported from Phabricator. Differential Revision: D67615570 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arhimondr thank for the change % comments.
54f4247
to
0c92f8b
Compare
This pull request was exported from Phabricator. Differential Revision: D67615570 |
0c92f8b
to
8197447
Compare
This pull request was exported from Phabricator. Differential Revision: D67615570 |
8197447
to
6421f7d
Compare
This pull request was exported from Phabricator. Differential Revision: D67615570 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arhimondr LGTM. Thanks for the update!
6421f7d
to
2631e22
Compare
This pull request was exported from Phabricator. Differential Revision: D67615570 |
2631e22
to
34fbab7
Compare
This pull request was exported from Phabricator. Differential Revision: D67615570 |
34fbab7
to
d82f1c8
Compare
This pull request was exported from Phabricator. Differential Revision: D67615570 |
d82f1c8
to
401586f
Compare
This pull request was exported from Phabricator. Differential Revision: D67615570 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arhimondr thanks for the iterations % nits.
@@ -52,6 +52,7 @@ Exchange::Exchange( | |||
operatorCtx_->driverCtx()->queryConfig(), | |||
serdeKind_)}, | |||
processSplits_{operatorCtx_->driverCtx()->driverId == 0}, | |||
driverId_{driverCtx->driverId}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we can just fetch from operatorCtx_->driverCtx()->driverId and not necessary save a copy of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wanted to safe a couple of extra dereferences :-)
velox/exec/ExchangeQueue.h
Outdated
uint32_t maxBytes, | ||
bool* atEnd, | ||
ContinueFuture* future, | ||
std::vector<ContinuePromise>& promises); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/promises/staledPromises/
Maybe put a comment? And at the caller, we expect it at most has one promise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually yeah, let me use a pointer instead of a list. It should never be more than one
Summary: Prevent exchange client from unblocking to early. Unblocking to early impedes effectiveness of page merging. When the cost of creating a vector is high (for example for data sets with high number of columns) creating small pages can make queries significantly less efficient. For example it was observed that when network is congested and Exchange buffers are not filled up as fast query may experience CPU efficiency drop up to 4x: T211034421 Reviewed By: xiaoxmeng Differential Revision: D67615570
401586f
to
d263477
Compare
This pull request was exported from Phabricator. Differential Revision: D67615570 |
This pull request has been merged in 121b230. |
Conbench analyzed the 0 benchmark runs that triggered this notification. None of the specified runs were found on the Conbench server. The full Conbench report has more details. |
Summary:
Prevent exchange client from unblocking to early. Unblocking to early impedes
effectiveness of page merging. When the cost of creating a vector is high (for
example for data sets with high number of columns) creating small pages can
make queries significantly less efficient.
For example it was observed that when network is congested and Exchange buffers
are not filled up as fast query may experience CPU efficiency drop up to 4x: T211034421
Differential Revision: D67615570