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

Update prefetcher to cancel discarded tasks #505

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

dannycjones
Copy link
Contributor

Description of change

Previously, mountpoint-s3 would not cancel prefetch tasks that it was going to ignore. Instead, they would continue to be polled by the executor despite the results never being checked. This could mean up to two (current and at most one "next" GET) would continue to run after the prefetcher had forgotten about them. This change ensures that the task handles are dropped which cancels the task/future.

In the future, we may want to retain some of these tasks where the prefetcher may still be able to make use of them. This refers to the todo comment that is retained from before.

This change was recommended in #488 as a distinct but loosely related issue.

Does this change impact existing behavior?

No breaking changes. This should cancel unused GET requests, freeing up bandwidth for GETs that will be used to fulfill mount-s3 reads.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

Previously, mountpoint-s3 would not cancel prefetch tasks that it was going to ignore.
Instead, they would continue to be polled by the executor despite the results never being checked.
This change ensures that the task handles are dropped which cancels the task/future.

In the future, we may want to retain some of these tasks where the prefetcher may still be able to make use of them.

Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>
@dannycjones dannycjones temporarily deployed to PR integration tests September 6, 2023 10:01 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests September 6, 2023 10:01 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests September 6, 2023 10:01 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests September 6, 2023 10:01 — with GitHub Actions Inactive
@dannycjones dannycjones added the performance PRs to run benchmarks on label Sep 6, 2023
@dannycjones dannycjones temporarily deployed to PR benchmarks September 6, 2023 10:01 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR benchmarks September 6, 2023 12:56 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR benchmarks September 6, 2023 12:56 — with GitHub Actions Inactive
@dannycjones dannycjones changed the title Cancel unused in-flight prefetch tasks Update prefetcher to cancel discarded tasks Sep 6, 2023
Copy link
Contributor

@passaro passaro left a comment

Choose a reason for hiding this comment

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

LGTM

Edit: on second look, dropping the task does not cancel the request, so we'll need to implement that on the client if we want this to work.

@passaro passaro self-requested a review September 6, 2023 16:28
@jamesbornholt jamesbornholt marked this pull request as ready for review September 6, 2023 16:51
@jamesbornholt jamesbornholt added this pull request to the merge queue Sep 6, 2023
@jamesbornholt
Copy link
Member

Won't fix #488 since this won't cancel the inflight GetObject request, but should help free up some resources spent on checksumming at least.

Merged via the queue into awslabs:main with commit 4db11ad Sep 6, 2023
@dannycjones dannycjones deleted the cancel-unused-fetch-tasks branch September 7, 2023 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance PRs to run benchmarks on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants