Skip to content

[DRAFT] Align read window with part boundaries#1671

Closed
vladem wants to merge 5 commits into
awslabs:mainfrom
vladem:aligned-read-window-end-2
Closed

[DRAFT] Align read window with part boundaries#1671
vladem wants to merge 5 commits into
awslabs:mainfrom
vladem:aligned-read-window-end-2

Conversation

@vladem

@vladem vladem commented Oct 23, 2025

Copy link
Copy Markdown
Contributor

Memory limiter currently doesn’t account for the “rounded up” memory by CRT, which means up to 8MiB of unaccounted memory per file handle. Based on this flaw in the memory model, limiter may choose larger windows, while there is actually no free memory for those. We should “round up” the read window to the next part boundary on our side.

While working on #1618 we've faced the issue that request_start_offset is not always available to the code picking the new read_window_end_offset. Specifically when cache is used BackpressureController has no information about the S3 request start offset.

This PR attempts to move the code picking read_window_end_offset close to the client and thus make request_start_offset available to it.

Does this change impact existing behavior?

No.

Does this change need a changelog entry? Does it require a version change?

No.


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).

@vladem vladem had a problem deploying to PR integration tests October 23, 2025 11:03 — with GitHub Actions Failure
@vladem vladem temporarily deployed to PR integration tests October 23, 2025 11:03 — with GitHub Actions Inactive
@vladem vladem changed the title [DRAFT] Compute read_window_end in RequestTask feature [DRAFT] Compute read_window_end in RequestTask future Oct 23, 2025
@vladem vladem force-pushed the aligned-read-window-end-2 branch from dfdb17e to a043121 Compare October 23, 2025 13:23
@vladem vladem had a problem deploying to PR integration tests October 23, 2025 13:24 — with GitHub Actions Failure
@vladem vladem temporarily deployed to PR integration tests October 23, 2025 13:24 — with GitHub Actions Inactive
@vladem vladem had a problem deploying to PR integration tests October 24, 2025 14:15 — with GitHub Actions Failure
@vladem vladem temporarily deployed to PR integration tests October 24, 2025 14:15 — with GitHub Actions Inactive
@vladem vladem force-pushed the aligned-read-window-end-2 branch from 570b57c to f44c247 Compare October 28, 2025 18:34
@vladem vladem temporarily deployed to PR integration tests October 28, 2025 18:34 — with GitHub Actions Inactive
@vladem vladem had a problem deploying to PR integration tests October 28, 2025 18:34 — with GitHub Actions Failure
@vladem vladem temporarily deployed to PR integration tests October 30, 2025 10:15 — with GitHub Actions Inactive
@vladem vladem added the performance PRs to run benchmarks on label Oct 30, 2025
@vladem vladem changed the title [DRAFT] Compute read_window_end in RequestTask future [DRAFT] Align read window with part boundaries Oct 31, 2025
Signed-off-by: Vlad Volodkin <vlaad@amazon.co.uk>
Signed-off-by: Vlad Volodkin <vlaad@amazon.co.uk>
Signed-off-by: Vlad Volodkin <vlaad@amazon.co.uk>
Signed-off-by: Vlad Volodkin <vlaad@amazon.co.uk>
Signed-off-by: Vlad Volodkin <vlaad@amazon.co.uk>
@vladem

vladem commented Nov 24, 2025

Copy link
Copy Markdown
Contributor Author

closing in favour of #1707

@vladem vladem closed this Nov 24, 2025
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.

1 participant