You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/05/19 07:17:29 UTC
[GitHub] [incubator-doris] adonis0147 commented on a diff in pull request #9683: [fix]Set the memory size used when FE starts according to the user's available memory at startup
adonis0147 commented on code in PR #9683:
URL: https://github.com/apache/incubator-doris/pull/9683#discussion_r876687681
##########
bin/start_fe.sh:
##########
@@ -132,13 +132,21 @@ fi
# check java version and choose correct JAVA_OPTS
java_version=$(jdk_version)
-final_java_opt=$JAVA_OPTS
+final_java_opt=$JAVA_OPTS_4G
+MemTotal=`free -g | grep "Mem" | awk '{print $7}'`
Review Comment:
The 7th item indicates the size of cached memory which may not be suitable.
```shell
MemTotalInGB="$(cat /proc/meminfo | grep 'MemTotal' | awk '{print int($2 / 1024 / 1024)}')"
MemAvailableInGB="$(cat /proc/meminfo | grep 'MemAvailable' | awk '{print int($2 / 1024 / 1024)}')"
```
These metrics may be useful.
MemTotalInGB = total
MemAvailableInGB = free + buffers/cache
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org