Skip to content

Commit 2832a34

Browse files
authored
Dynamic default part size (#931)
1 parent 72b5023 commit 2832a34

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

src/main/java/software/amazon/awssdk/crt/s3/S3ClientOptions.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,18 @@ public AwsSigningConfig getSigningConfig() {
148148
return signingConfig;
149149
}
150150

151+
/**
152+
* Sets the size, in bytes, of parts that files will be downloaded or uploaded in.
153+
* If not set, a dynamic default part size will be used based on the throughputTargetGbps, memoryLimitInBytes and initialReadWindowSize
154+
* to utilize the available resource and get the best performance.
155+
*
156+
* Notes: For PUT_OBJECT requests, the client will automatically adjust the part size to meet service limits:
157+
* - Maximum number of parts per upload is 10,000
158+
* - Minimum upload part size is 5 MiB
159+
*
160+
* @param partSize size in bytes of parts for downloads and uploads
161+
* @return this
162+
*/
151163
public S3ClientOptions withPartSize(long partSize) {
152164
this.partSize = partSize;
153165
return this;
@@ -358,7 +370,7 @@ public S3ExpressCredentialsProviderFactory getS3ExpressCredentialsProviderFactor
358370
* The amount of memory the CRT client is allowed to use.
359371
* The client makes a best-effort attempt at memory limiting but might exceed this limit in some cases.
360372
* If not provided, the client calculates this optimally from other settings, such as targetThroughput.
361-
* On a 64-bit system, the default is between 2Gib-8Gib.
373+
* On a 64-bit system, the default is between 2Gib-24Gib.
362374
* It must be at least 1GiB and will be capped to SIZE_MAX of the system.
363375
* @param memoryLimitBytes Memory limit in bytes.
364376
* @return this

0 commit comments

Comments
 (0)