Skip to content

Commit

Permalink
disable backpressure for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
TingDaoK committed Sep 5, 2024
1 parent caae0eb commit aa7adbb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ///////////////

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit aa7adbb

Please sign in to comment.