From 7ea2e2f7b965e833042359d1ee24b9585868cee4 Mon Sep 17 00:00:00 2001 From: Michael Greenberg Date: Thu, 6 Mar 2025 12:07:16 -0300 Subject: [PATCH 1/2] Smaller chunk size --- s3/src/bucket.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3/src/bucket.rs b/s3/src/bucket.rs index e75cb031fd..60abc70d27 100644 --- a/s3/src/bucket.rs +++ b/s3/src/bucket.rs @@ -49,7 +49,7 @@ use crate::utils::error_from_response_data; use http::header::HeaderName; use http::HeaderMap; -pub const CHUNK_SIZE: usize = 268_435_456; // 256 Mebibytes (8 wasn't enough), min is 5 (5_242_880); +pub const CHUNK_SIZE: usize = 16_777_216; // 16 Mebibytes (8 wasn't enough), min is 5 (5_242_880); const DEFAULT_REQUEST_TIMEOUT: Option = Some(Duration::from_secs(60)); From fe3d4eff6ff486a0170e254b002ccf2622807113 Mon Sep 17 00:00:00 2001 From: Michael Greenberg Date: Thu, 6 Mar 2025 13:19:26 -0300 Subject: [PATCH 2/2] 32 megabytes! Should be enough for everyone --- s3/src/bucket.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3/src/bucket.rs b/s3/src/bucket.rs index 60abc70d27..324efa4360 100644 --- a/s3/src/bucket.rs +++ b/s3/src/bucket.rs @@ -49,7 +49,7 @@ use crate::utils::error_from_response_data; use http::header::HeaderName; use http::HeaderMap; -pub const CHUNK_SIZE: usize = 16_777_216; // 16 Mebibytes (8 wasn't enough), min is 5 (5_242_880); +pub const CHUNK_SIZE: usize = 33_554_432; // 32 Mebibytes (8 wasn't enough), min is 5 (5_242_880); const DEFAULT_REQUEST_TIMEOUT: Option = Some(Duration::from_secs(60));