Skip to content

Commit 38079f7

Browse files
authored
adjust run-clara memory calculation (#1070)
1 parent 27b6c1d commit 38079f7

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

bin/run-clara

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,9 @@ shift $((OPTIND-1))
5252
inputs=$@
5353

5454
# Configure JVM memory settings (overridedable via $JAVA_OPTS):
55-
if [ -z ${large+x} ]
56-
then
57-
gb_max=$((threads<3?threads+2:threads+2-threads/4))
58-
gb_init=$((threads<3?threads:threads-threads/3))
59-
else
60-
gb_max=$((threads<3?threads+2:threads+2-threads/8))
61-
gb_init=$((threads<3?threads:threads-threads/6))
62-
fi
55+
gb_init=$((threads))
56+
gb_max=$((threads+2))
57+
[ $threads -gt 1 ] && ! [ -z ${large+x} ] && gb_max=$((threads*2))
6358
java_opts="-Xms${gb_init}g -Xmx${gb_max}g"
6459

6560
# Check configuration:

0 commit comments

Comments
 (0)