Skip to content

Commit

Permalink
Adaptive optimal batch size
Browse files Browse the repository at this point in the history
  • Loading branch information
benmoriceau committed Oct 10, 2023
1 parent 6482389 commit e81e5fe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public long getOptimalBatchSizeBytes() {
// resource the connector will usually at most fill up around 150 MB in a single queue. By lowering
// the batch size, the AsyncFlusher will flush in smaller batches which allows for memory to be
// freed earlier similar to a sliding window effect
return 175 * 1024 * 1024;
return Double.valueOf(Runtime.getRuntime().maxMemory() * 0.2).longValue();
}

}

0 comments on commit e81e5fe

Please sign in to comment.