Change ES Heap calculation

This commit is contained in:
Mike Reeves
2021-03-16 18:53:41 -04:00
parent 065f1c2927
commit 7719a26a96

View File

@@ -1201,8 +1201,13 @@ es_heapsize() {
# https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html # https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html
ES_HEAP_SIZE="25000m" ES_HEAP_SIZE="25000m"
else else
# Set heap size to 25% of available memory # Set heap size to 33% of available memory
ES_HEAP_SIZE=$(( total_mem / 4 ))"m" ES_HEAP_SIZE=$(( total_mem / 3 ))"m"
if [ "$ES_HEAP_SIZE" -ge 25001 ] ; then
ES_HEAP_SIZE="25000m"
else
ES_HEAP_SIZE=$ES_HEAP_SIZE
fi
fi fi
export ES_HEAP_SIZE export ES_HEAP_SIZE