diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-02-20 17:18:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-20 17:18:58 +0100 |
commit | c8b509e153e9c460ac4e6110bb9e33aae779d51b (patch) | |
tree | 7be7af900fd5c6e2350016908972b94fafd062bb /container-disc | |
parent | 756fb6233fa77c69a0cf967342968223e205175e (diff) |
Revert "Revert "Control -XX:CompressedClassSpaceSize jvm option.""
Diffstat (limited to 'container-disc')
-rwxr-xr-x | container-disc/src/main/sh/vespa-start-container-daemon.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/container-disc/src/main/sh/vespa-start-container-daemon.sh b/container-disc/src/main/sh/vespa-start-container-daemon.sh index 382843b5688..f097d6d72bc 100755 --- a/container-disc/src/main/sh/vespa-start-container-daemon.sh +++ b/container-disc/src/main/sh/vespa-start-container-daemon.sh @@ -64,6 +64,7 @@ configure_memory() { consider_fallback jvm_heapsize 1536 consider_fallback jvm_stacksize 512 consider_fallback jvm_baseMaxDirectMemorySize 75 + consider_fallback jvm_compressedClassSpaceSize 32 consider_fallback jvm_directMemorySizeCache 0 # Update jvm_heapsize only if percentage is explicitly set (default is 0). @@ -80,16 +81,20 @@ configure_memory() { fi # Safety measure against bad min vs max heapsize. - if ((jvm_minHeapsize > jvm_heapsize)); then + if ((jvm_minHeapsize > jvm_heapsize)); then jvm_minHeapsize=${jvm_heapsize} echo "Misconfigured heap size, jvm_minHeapsize(${jvm_minHeapsize} is larger than jvm_heapsize(${jvm_heapsize}). It has been capped." - fi + fi maxDirectMemorySize=$(( jvm_baseMaxDirectMemorySize + jvm_heapsize / 8 + jvm_directMemorySizeCache )) memory_options="-Xms${jvm_minHeapsize}m -Xmx${jvm_heapsize}m" memory_options="${memory_options} -XX:ThreadStackSize=${jvm_stacksize}" - memory_options="${memory_options} -XX:MaxDirectMemorySize=${maxDirectMemorySize}m" + memory_options="${memory_options} -XX:MaxDirectMemorySize=${maxDirectMemorySize}m" + + if ((jvm_compressedClassSpaceSize != 0)); then + memory_options="${memory_options} -XX:CompressedClassSpaceSize=${compressedClassSpaceSize}m" + fi if [ "${VESPA_USE_HUGEPAGES}" ]; then memory_options="${memory_options} -XX:+UseLargePages" |