This is an automated email from the ASF dual-hosted git repository. jackietien pushed a commit to branch ty/AddStartUpVMParameter in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 21ef00a97510b916c73864f5bd9538cf5ced1c91 Author: JackieTien97 <[email protected]> AuthorDate: Wed Jan 31 20:02:44 2024 +0800 Add -XX:+PrintStringTableStatistics VM options to print StringTableStatistics after JVM exits --- iotdb-core/confignode/src/assembly/resources/conf/confignode-env.bat | 5 +++-- iotdb-core/confignode/src/assembly/resources/conf/confignode-env.sh | 5 +++-- iotdb-core/datanode/src/assembly/resources/conf/datanode-env.bat | 5 +++-- iotdb-core/datanode/src/assembly/resources/conf/datanode-env.sh | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/iotdb-core/confignode/src/assembly/resources/conf/confignode-env.bat b/iotdb-core/confignode/src/assembly/resources/conf/confignode-env.bat index f0e0b95d739..c4cb3b02c4c 100644 --- a/iotdb-core/confignode/src/assembly/resources/conf/confignode-env.bat +++ b/iotdb-core/confignode/src/assembly/resources/conf/confignode-env.bat @@ -122,9 +122,10 @@ set CONFIGNODE_HEAP_OPTS=-Xmx%ON_HEAP_MEMORY% -Xms%ON_HEAP_MEMORY% set CONFIGNODE_HEAP_OPTS=%CONFIGNODE_HEAP_OPTS% -XX:MaxDirectMemorySize=%OFF_HEAP_MEMORY% set CONFIGNODE_HEAP_OPTS=%CONFIGNODE_HEAP_OPTS% -Djdk.nio.maxCachedBufferSize=%MAX_CACHED_BUFFER_SIZE% set IOTDB_HEAP_OPTS=%IOTDB_HEAP_OPTS% -XX:+CrashOnOutOfMemoryError +set IOTDB_HEAP_OPTS=%IOTDB_HEAP_OPTS% -XX:+PrintStringTableStatistics -@REM if you want to dump the heap memory while OOM happening, you can use the following command, remember to replace /tmp/heapdump.hprof with your own file path and the folder where this file is located needs to be created in advance -@REM IOTDB_JMX_OPTS=%IOTDB_HEAP_OPTS% -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=\tmp\confignode_heapdump.hprof +@REM if you want to dump the heap memory while OOM happening, you can use the following command, remember to replace /tmp/ with your own file path and the folder where this file is located needs to be created in advance +@REM IOTDB_JMX_OPTS=%IOTDB_HEAP_OPTS% -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=\tmp\ @REM You can put your env variable here @REM set JAVA_HOME=%JAVA_HOME% diff --git a/iotdb-core/confignode/src/assembly/resources/conf/confignode-env.sh b/iotdb-core/confignode/src/assembly/resources/conf/confignode-env.sh index 6e58fe3633f..570314be37c 100644 --- a/iotdb-core/confignode/src/assembly/resources/conf/confignode-env.sh +++ b/iotdb-core/confignode/src/assembly/resources/conf/confignode-env.sh @@ -274,8 +274,9 @@ CONFIGNODE_JMX_OPTS="$CONFIGNODE_JMX_OPTS -Xmx${ON_HEAP_MEMORY}" CONFIGNODE_JMX_OPTS="$CONFIGNODE_JMX_OPTS -XX:MaxDirectMemorySize=${OFF_HEAP_MEMORY}" CONFIGNODE_JMX_OPTS="$CONFIGNODE_JMX_OPTS -Djdk.nio.maxCachedBufferSize=${MAX_CACHED_BUFFER_SIZE}" IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -XX:+CrashOnOutOfMemoryError" -# if you want to dump the heap memory while OOM happening, you can use the following command, remember to replace /tmp/heapdump.hprof with your own file path and the folder where this file is located needs to be created in advance -#IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/confignode_heapdump.hprof" +IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -XX:+PrintStringTableStatistics" +# if you want to dump the heap memory while OOM happening, you can use the following command, remember to replace /tmp/ with your own file path and the folder where this file is located needs to be created in advance +#IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/" echo "ConfigNode on heap memory size = ${ON_HEAP_MEMORY}B, off heap memory size = ${OFF_HEAP_MEMORY}B" echo "If you want to change this configuration, please check conf/confignode-env.sh." diff --git a/iotdb-core/datanode/src/assembly/resources/conf/datanode-env.bat b/iotdb-core/datanode/src/assembly/resources/conf/datanode-env.bat index d1ec4b1c117..11922caf212 100644 --- a/iotdb-core/datanode/src/assembly/resources/conf/datanode-env.bat +++ b/iotdb-core/datanode/src/assembly/resources/conf/datanode-env.bat @@ -121,9 +121,10 @@ set IOTDB_HEAP_OPTS=-Xmx%ON_HEAP_MEMORY% -Xms%ON_HEAP_MEMORY% set IOTDB_HEAP_OPTS=%IOTDB_HEAP_OPTS% -XX:MaxDirectMemorySize=%OFF_HEAP_MEMORY% set IOTDB_HEAP_OPTS=%IOTDB_HEAP_OPTS% -Djdk.nio.maxCachedBufferSize=%MAX_CACHED_BUFFER_SIZE% set IOTDB_HEAP_OPTS=%IOTDB_HEAP_OPTS% -XX:+CrashOnOutOfMemoryError +set IOTDB_HEAP_OPTS=%IOTDB_HEAP_OPTS% -XX:+PrintStringTableStatistics -@REM if you want to dump the heap memory while OOM happening, you can use the following command, remember to replace /tmp/heapdump.hprof with your own file path and the folder where this file is located needs to be created in advance -@REM IOTDB_JMX_OPTS=%IOTDB_HEAP_OPTS% -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=\tmp\datanode_heapdump.hprof +@REM if you want to dump the heap memory while OOM happening, you can use the following command, remember to replace /tmp/ with your own file path and the folder where this file is located needs to be created in advance +@REM IOTDB_JMX_OPTS=%IOTDB_HEAP_OPTS% -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=\tmp\ @REM You can put your env variable here @REM set JAVA_HOME=%JAVA_HOME% diff --git a/iotdb-core/datanode/src/assembly/resources/conf/datanode-env.sh b/iotdb-core/datanode/src/assembly/resources/conf/datanode-env.sh index 50282ccec3d..5a50c984ee6 100755 --- a/iotdb-core/datanode/src/assembly/resources/conf/datanode-env.sh +++ b/iotdb-core/datanode/src/assembly/resources/conf/datanode-env.sh @@ -269,8 +269,9 @@ IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -Xmx${ON_HEAP_MEMORY}" IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -XX:MaxDirectMemorySize=${OFF_HEAP_MEMORY}" IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -Djdk.nio.maxCachedBufferSize=${MAX_CACHED_BUFFER_SIZE}" IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -XX:+CrashOnOutOfMemoryError" -# if you want to dump the heap memory while OOM happening, you can use the following command, remember to replace /tmp/heapdump.hprof with your own file path and the folder where this file is located needs to be created in advance -#IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/datanode_heapdump.hprof" +IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -XX:+PrintStringTableStatistics" +# if you want to dump the heap memory while OOM happening, you can use the following command, remember to replace /tmp/ with your own file path and the folder where this file is located needs to be created in advance +#IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/" echo "DataNode on heap memory size = ${ON_HEAP_MEMORY}B, off heap memory size = ${OFF_HEAP_MEMORY}B"
