diff --git a/runners/s3-benchrunner-java/src/main/java/com/example/s3benchrunner/Main.java b/runners/s3-benchrunner-java/src/main/java/com/example/s3benchrunner/Main.java index 86b9ff1b..b5bd69a8 100644 --- a/runners/s3-benchrunner-java/src/main/java/com/example/s3benchrunner/Main.java +++ b/runners/s3-benchrunner-java/src/main/java/com/example/s3benchrunner/Main.java @@ -11,8 +11,9 @@ public class Main { /////////////// BEGIN ARBITRARY HARDCODED VALUES /////////////// // 256MiB is Java Transfer Mgr v2 default. - // TODO: Investigate. At time of writing, this noticeably impacts performance. - public static final int BACKPRESSURE_INITIAL_READ_WINDOW_MiB = 256; + // This benchmark can turn off backpressure and rely solely on the + // memory-limiter. + public static final int BACKPRESSURE_INITIAL_READ_WINDOW_MiB = 0; /////////////// END ARBITRARY HARD-CODED VALUES /////////////// diff --git a/runners/s3-benchrunner-java/src/main/java/com/example/s3benchrunner/crtjava/CRTJavaBenchmarkRunner.java b/runners/s3-benchrunner-java/src/main/java/com/example/s3benchrunner/crtjava/CRTJavaBenchmarkRunner.java index bcaf6a50..a84f0c64 100644 --- a/runners/s3-benchrunner-java/src/main/java/com/example/s3benchrunner/crtjava/CRTJavaBenchmarkRunner.java +++ b/runners/s3-benchrunner-java/src/main/java/com/example/s3benchrunner/crtjava/CRTJavaBenchmarkRunner.java @@ -78,7 +78,7 @@ public CRTJavaBenchmarkRunner(BenchmarkConfig config, String bucket, String regi // If writing data to disk, enable backpressure. // This prevents us from running out of memory due to downloading // data faster than we can write it to disk. - if (config.filesOnDisk) { + if (config.filesOnDisk && Main.BACKPRESSURE_INITIAL_READ_WINDOW_MiB!=0) { s3ClientOpts.withReadBackpressureEnabled(true); s3ClientOpts.withInitialReadWindowSize(Util.bytesFromMiB(Main.BACKPRESSURE_INITIAL_READ_WINDOW_MiB)); }