From 4315f610b7f01ee830b622b75b1f5fa2b098ecee Mon Sep 17 00:00:00 2001 From: Yi WU Date: Wed, 20 Jul 2022 22:30:35 +0800 Subject: [PATCH] check vm.max_map_count before starting When vectorized engine is enabled, doris uses much more vmas than before, and it leads to core dump due to memory allocation failure. --- bin/start_be.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/start_be.sh b/bin/start_be.sh index 74e1b49c14d85d..17c6542d197265 100755 --- a/bin/start_be.sh +++ b/bin/start_be.sh @@ -53,6 +53,12 @@ export DORIS_HOME=$( pwd ) +MAX_MAP_COUNT=`sysctl -n vm.max_map_count` +if [ $MAX_MAP_COUNT -lt 2000000 ]; then + echo "Please set vm.max_map_count to be 2000000. sysctl -w vm.max_map_count=2000000" + exit 1 +fi + # add libs to CLASSPATH for f in $DORIS_HOME/lib/*.jar; do if [ ! -n "${DORIS_JNI_CLASSPATH_PARAMETER}" ]; then