From 08ebef2992a5afeef7587392d44093045e31ea6a Mon Sep 17 00:00:00 2001 From: Yongqiang YANG <98214048+dataroaring@users.noreply.github.com> Date: Thu, 21 Jul 2022 21:16:48 +0800 Subject: [PATCH] [Enhancement] check vm.max_map_count before starting (#11052) 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 551a12e5c0..4944230252 100755 --- a/bin/start_be.sh +++ b/bin/start_be.sh @@ -58,6 +58,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