aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2021-06-09 22:30:10 +0200
committerGitHub <noreply@github.com>2021-06-09 22:30:10 +0200
commit2a2f3144d8a65302843202156aa0109f583eae75 (patch)
tree284e22bf34ac71be34e5b1e4483a600d9a8304e3
parentb77e40981df87b1da2f8a35f5b78390a75c33642 (diff)
parent2dc2671066f4cf049f8c97dadb5886e03526de13 (diff)
Merge pull request #18178 from vespa-engine/bratseth/vespa-visit-Xmx
Allow -Xmx to be specified as an argument to vespa-visit
-rwxr-xr-xvespaclient-java/src/main/sh/vespa-visit.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/vespaclient-java/src/main/sh/vespa-visit.sh b/vespaclient-java/src/main/sh/vespa-visit.sh
index 92d6bc67f3f..e4fec2857fe 100755
--- a/vespaclient-java/src/main/sh/vespa-visit.sh
+++ b/vespaclient-java/src/main/sh/vespa-visit.sh
@@ -74,16 +74,25 @@ findhost
# END environment bootstrap section
+Xmx="-Xmx1024m"
+# Allow -Xmx to be specified in args
+for arg in "$@"; do
+ shift
+ case $arg in -Xmx*) Xmx=$arg ;;
+ *) set -- "$@" "$arg" ;;
+ esac
+done
+
if [ "${VESPA_LOG_LEVEL}" = "" ]; then
export VESPA_LOG_LEVEL=error,warning
fi
-export MALLOC_ARENA_MAX=1 #Does not need fast allocation
+export MALLOC_ARENA_MAX=1 # Does not need fast allocation
exec java \
-server -enableassertions \
-XX:ThreadStackSize=512 \
-XX:MaxJavaStackTraceDepth=1000000 \
-Djava.library.path=${VESPA_HOME}/libexec64/native:${VESPA_HOME}/lib64 \
-XX:MaxDirectMemorySize=32m -Djava.awt.headless=true \
--Xms128m -Xmx1024m $(getJavaOptionsIPV46) \
+-Xms128m $(getJavaOptionsIPV46) ${Xmx} \
-cp ${VESPA_HOME}/lib/jars/vespaclient-java-jar-with-dependencies.jar com.yahoo.vespavisit.VdsVisit "$@"