Skip to content

Commit

Permalink
GH-2799 overflow if less than 15% of heap is available
Browse files Browse the repository at this point in the history
  • Loading branch information
abrokenjester authored and hmottestad committed Apr 16, 2021
1 parent 2432726 commit 590dad6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ private synchronized void checkMemoryOverflow() {
maxBlockSize = blockSize;
}
// Sync if either the estimated size of the next block is larger than remaining memory, or
// if less than 10% of the heap is still free (this last condition to avoid GC overhead limit)
if (freeToAllocateMemory < Math.min(0.1 * maxMemory, maxBlockSize)) {
// if less than 15% of the heap is still free (this last condition to avoid GC overhead limit)
if (freeToAllocateMemory < Math.min(0.15 * maxMemory, maxBlockSize)) {
logger.debug("syncing at {} triples. max block size: {}", size, maxBlockSize);
overflowToDisk();
}
Expand Down

0 comments on commit 590dad6

Please sign in to comment.