Repository navigation
Conversation
The AsyncReader's soft-start began reads at 4KB and doubled each read until reaching the full 1MB buffer size. This added 9 undersized reads at the start of every transfer for no benefit: - The buffer is already allocated at full size from the pool, so slicing it smaller doesn't save memory. - The kernel handles small files naturally - read(fd, buf, 1MB) on a 3KB file just returns 3KB. - Each undersized read is a wasted syscall. Remove it and always use the full buffer from the first read. Fixes: rclone#9282 Signed-off-by: Patrick Farrell <[email protected]>
Contributor
Author
|
Note: this touches the same AsyncReader code as #9285 (configurable I/O block size). They're independent changes — whichever lands first, the other will need a trivial rebase. |
Member
|
The soft start logic is about latency, not throughput. It enables rclone to start delivering bytes quicker Now whether it is still working or needed I don't know, but we need to benchmark the latency to see the effects. I usually do this by setting a --bwlimit . Somewhere I have some python scripts to measure the latency ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The AsyncReader's soft-start began reads at 4KB and doubled each read until reaching the full 1MB buffer size. This added 9 undersized reads at the start of every transfer for no benefit:
Remove it and always use the full buffer from the first read.
Fixes: #9282
What is the purpose of this change?
Remove unnecessary/strange IO soft-start reader logic.
The AsyncReader's soft-start began reads at 4KB and doubled each read until reaching the full 1MB buffer size. This added 9 undersized reads at the start of every transfer for no benefit:
Remove it and always use the full buffer from the first read.
Was the change discussed in an issue or in the forum before?
#9282
Checklist