@@ -125,7 +125,7 @@ fn parse_duration(arg: &str) -> Result<Duration, String> {
125125}
126126
127127impl CliArgs {
128- fn memory_target ( & self ) -> u64 {
128+ fn memory_target_in_bytes ( & self ) -> u64 {
129129 if let Some ( target) = self . max_memory_target {
130130 target * 1024 * 1024
131131 } else {
@@ -136,10 +136,10 @@ impl CliArgs {
136136 }
137137
138138 fn s3_client_config ( & self ) -> S3ClientConfig {
139- let initial_read_window_size = 1024 * 1024 + 128 * 1024 ;
139+ // Set up backpressure with the same initial window used in Mountpoint.
140140 let mut client_config = S3ClientConfig :: new ( )
141141 . read_backpressure ( true )
142- . initial_read_window ( initial_read_window_size )
142+ . initial_read_window ( mountpoint_s3_fs :: s3 :: config :: INITIAL_READ_WINDOW_SIZE )
143143 . endpoint_config ( EndpointConfig :: new ( self . region . as_str ( ) ) ) ;
144144 if let Some ( throughput_target_gbps) = self . maximum_throughput_gbps {
145145 client_config = client_config. throughput_target_gbps ( throughput_target_gbps as f64 ) ;
@@ -166,7 +166,7 @@ fn main() -> anyhow::Result<()> {
166166 let bucket = args. bucket . as_str ( ) ;
167167 let client_config = args. s3_client_config ( ) ;
168168 let client = S3CrtClient :: new ( client_config) . context ( "failed to create S3 CRT client" ) ?;
169- let mem_limiter = Arc :: new ( MemoryLimiter :: new ( client. clone ( ) , args. memory_target ( ) ) ) ;
169+ let mem_limiter = Arc :: new ( MemoryLimiter :: new ( client. clone ( ) , args. memory_target_in_bytes ( ) ) ) ;
170170 let runtime = Runtime :: new ( client. event_loop_group ( ) ) ;
171171
172172 // Verify if all objects exist and collect metadata
0 commit comments