You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xu...@apache.org on 2021/03/02 01:23:13 UTC

[iotdb] 01/01: add max direct memory size

This is an automated email from the ASF dual-hosted git repository.

xuekaifeng pushed a commit to branch add_max_direct_heap_parameter
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit d588405c3bb4597a7c5a92754b8fc35c24538455
Author: 151250176 <15...@smail.nju.edu.cn>
AuthorDate: Tue Mar 2 09:21:57 2021 +0800

    add max direct memory size
---
 server/src/assembly/resources/conf/iotdb-env.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/server/src/assembly/resources/conf/iotdb-env.sh b/server/src/assembly/resources/conf/iotdb-env.sh
index 10e8baa..5f7feb4 100755
--- a/server/src/assembly/resources/conf/iotdb-env.sh
+++ b/server/src/assembly/resources/conf/iotdb-env.sh
@@ -169,6 +169,8 @@ calculate_heap_sizes
 #MAX_HEAP_SIZE="2G"
 # Minimum heap size
 #HEAP_NEWSIZE="2G"
+# maximum direct memroy size
+MAX_DIRECT_MEMORY_SIZE=${MAX_HEAP_SIZE}
 
 #true or false
 #DO NOT FORGET TO MODIFY THE PASSWORD FOR SECURITY (${IOTDB_CONF}/jmx.password and ${IOTDB_CONF}/jmx.access)
@@ -202,6 +204,7 @@ fi
 
 IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -Xms${HEAP_NEWSIZE}"
 IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -Xmx${MAX_HEAP_SIZE}"
+IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -XX:MaxDirectMemorySize=${MAX_DIRECT_MEMORY_SIZE}"
 
 echo "Maximum memory allocation pool = ${MAX_HEAP_SIZE}B, initial memory allocation pool = ${HEAP_NEWSIZE}B"
 echo "If you want to change this configuration, please check conf/iotdb-env.sh(Unix or OS X, if you use Windows, check conf/iotdb-env.bat)."