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
service/s3/s3manager: Add Upload Buffer Provider #2792
Merged
Merged
Conversation
This file contains 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
skmcgrail
added
the
needs-review
This issue or pull request needs review from a core team member.
label
Aug 28, 2019
skmcgrail
force-pushed
the
s3manager/buffering
branch
6 times, most recently
from
August 30, 2019 20:47
afa1a91
to
cd98853
Compare
jasdel
suggested changes
Aug 30, 2019
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.
In the cases were static numbers are use, i think it may be easier to ready if inline multiplication is used for the varing sizes, e.g. 1024*1024*5
for 5MB
awstesting/integration/performance/s3UploadManager/main_test.go
Outdated
Show resolved
Hide resolved
skmcgrail
force-pushed
the
s3manager/buffering
branch
12 times, most recently
from
September 10, 2019 15:21
11b425f
to
cffe932
Compare
skmcgrail
force-pushed
the
s3manager/buffering
branch
2 times, most recently
from
September 11, 2019 00:45
d38f7b1
to
deef349
Compare
jasdel
suggested changes
Sep 11, 2019
skmcgrail
force-pushed
the
s3manager/buffering
branch
from
September 11, 2019 21:49
deef349
to
58db59d
Compare
skmcgrail
force-pushed
the
s3manager/buffering
branch
from
September 16, 2019 18:30
58db59d
to
a7f914b
Compare
jasdel
approved these changes
Sep 16, 2019
skmcgrail
force-pushed
the
s3manager/buffering
branch
from
September 16, 2019 19:31
a7f914b
to
1c07843
Compare
skmcgrail
force-pushed
the
s3manager/buffering
branch
2 times, most recently
from
September 16, 2019 23:49
49f871a
to
edc26b1
Compare
skmcgrail
changed the title
service/s3/s3manager: Add BufferStrategy for Defining Buffering of Upload Parts
service/s3/s3manager: Add Upload Buffer Provider
Sep 16, 2019
…nager To Support Benchmarking
skmcgrail
force-pushed
the
s3manager/buffering
branch
from
September 17, 2019 00:15
edc26b1
to
6bd54b5
Compare
skmcgrail
removed
the
needs-review
This issue or pull request needs review from a core team member.
label
Sep 17, 2019
Merged
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.
Purpose
This change is to help address the performance of
s3manager.Uploader
in particular on Windows platforms. This PR defines a new BufferStrategy configuration option to the Upload manager which will allow users to define whether a[]byte
buffer should be used when uploading each part. The reasoning for this new strategy definition, is due to the fact that each part wraps the providedio.ReadSeeker
to Uploader in anio.SectionReader
which is limited to read from a particular offset and number of bytes. On the Windows platform if the underlyingio.ReadSeeker
is an*os.File
this will result in a large number of blocking events as*os.File.ReadAt
uses an emulated pread syscall which requires a mutex lock on the file in order to satisfy the read request. Introducing a BufferStrategy, specifically for Windows results in performance increase, especially in cases where the configured concurrency value for part uploads is high. This change will only enable a buffering strategy by default for the Windows platform, and UNIX-like systems will continue to employ an non-buffering strategy.Benchmark
Windows
Benchmarks
Summary
Data
Linux
Benchmarks
Summary
Data