Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
runs-on: ${{ matrix.os }}-latest
services:
minio:
image: ${{ (matrix.os == 'ubuntu') && 'bitnami/minio:2023.7.18' || ''}}
image: ${{ (matrix.os == 'ubuntu') && 'quay.io/minio/minio:latest' || '' }}
ports:
- 45677:9000
options: >-
Expand All @@ -56,6 +56,7 @@ jobs:
env:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
command: server /data --console-address ":9001"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
Expand Down
1 change: 1 addition & 0 deletions storage/mock_storage.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions storage/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ const (

// the key of the object metadata which is used to handle retry decision on NoSuchUpload error
metadataKeyRetryID = "s5cmd-upload-retry-id"

DownloaderBufferSize = 64 * 1024
UploaderBufferSize = 512 * 1024
)

// Re-used AWS sessions dramatically improve performance.
Expand Down Expand Up @@ -102,10 +105,15 @@ func newS3Storage(ctx context.Context, opts Options) (*S3, error) {
return nil, err
}

downloader := s3manager.NewDownloader(awsSession)
downloader.BufferProvider = s3manager.NewPooledBufferedWriterReadFromProvider(DownloaderBufferSize)
uploader := s3manager.NewUploader(awsSession)
uploader.BufferProvider = s3manager.NewBufferedReadSeekerWriteToPool(UploaderBufferSize)

return &S3{
api: s3.New(awsSession),
downloader: s3manager.NewDownloader(awsSession),
uploader: s3manager.NewUploader(awsSession),
downloader: downloader,
uploader: uploader,
endpointURL: endpointURL,
dryRun: opts.DryRun,
useListObjectsV1: opts.UseListObjectsV1,
Expand Down