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

Avoid unnecessary reclaim on non-reclaimable query #9737

Closed
wants to merge 1 commit into from

Conversation

xiaoxmeng
Copy link
Contributor

@xiaoxmeng xiaoxmeng commented May 7, 2024

Avoid unnecessary reclaim on non-reclaimable query which might spent time on waiting
for query task to pause.
Also allows arbitration to reclaim reserved capacity from the request pool itself.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 7, 2024
Copy link

netlify bot commented May 7, 2024

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 462ea83
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/663a6747bc7cab0008526d52

@xiaoxmeng xiaoxmeng marked this pull request as ready for review May 7, 2024 16:04
@facebook-github-bot
Copy link
Contributor

@xiaoxmeng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@xiaoxmeng xiaoxmeng force-pushed the reclaim branch 2 times, most recently from 779e919 to 2fecf99 Compare May 7, 2024 17:37
@facebook-github-bot
Copy link
Contributor

@xiaoxmeng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@xiaoxmeng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@@ -181,9 +181,10 @@ void SharedArbitrator::getCandidateStats(
op->candidates.clear();
op->candidates.reserve(op->candidatePools.size());
for (const auto& pool : op->candidatePools) {
const bool selfCandidate = op->requestRoot == pool.get();
Copy link
Contributor

@tanjialiang tanjialiang May 7, 2024

Choose a reason for hiding this comment

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

s/selfCandidate/isSelfReclaim/ to have the consistent name across methods.

int64_t SharedArbitrator::maxReclaimableCapacity(const MemoryPool& pool) const {
int64_t SharedArbitrator::maxReclaimableCapacity(
const MemoryPool& pool,
bool isSelfReclaim) const {
// Checks if a query memory pool has finished processing or not. If it has
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we update the comments here as well?

Copy link
Contributor

@tanjialiang tanjialiang left a comment

Choose a reason for hiding this comment

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

Thanks for the changes. One more thing maybe as a follow up to do. The arbitrator is growing more complicated with a bunch of special treatment. Do you think we shall document details on the arbitrator's mechanisms, modes, reservation pools etc. on top of SharedArbitrator class as an overview?

@facebook-github-bot
Copy link
Contributor

@xiaoxmeng merged this pull request in ad25e87.

@xiaoxmeng xiaoxmeng deleted the reclaim branch May 7, 2024 21:09
Copy link

Conbench analyzed the 1 benchmark run on commit ad25e87b.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

Joe-Abraham pushed a commit to Joe-Abraham/velox that referenced this pull request May 8, 2024
…#9737)

Summary:
Avoid unnecessary reclaim on non-reclaimable query which might spent time on waiting
for query task to pause.
Also allows arbitration to reclaim reserved capacity from the request pool itself.

Pull Request resolved: facebookincubator#9737

Reviewed By: tanjialiang

Differential Revision: D57055391

Pulled By: xiaoxmeng

fbshipit-source-id: 34fd61a343e445c2e5a4e228f3ce54d630c65f24
Joe-Abraham pushed a commit to Joe-Abraham/velox that referenced this pull request Jun 7, 2024
…#9737)

Summary:
Avoid unnecessary reclaim on non-reclaimable query which might spent time on waiting
for query task to pause.
Also allows arbitration to reclaim reserved capacity from the request pool itself.

Pull Request resolved: facebookincubator#9737

Reviewed By: tanjialiang

Differential Revision: D57055391

Pulled By: xiaoxmeng

fbshipit-source-id: 34fd61a343e445c2e5a4e228f3ce54d630c65f24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants