Asking for mmap to be extended

This commit is contained in:
Tsvetomir Hristov 2024-10-11 12:54:22 +02:00
parent 77a6ce257b
commit 580dc99929

View file

@ -76,7 +76,18 @@ function update_script() {
exit
}
function ask_extend_mmap() {
read -r -p "Elasticsearch recommends extending the vm.max_map_count \n(https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html)? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Extending mmap"
sysctl -w vm.max_map_count=262144
echo "vm.max_map_count=262144" >> /etc/sysctl.conf
msg_ok "Extended mmap"
fi
}
start
ask_extend_mmap
build_container
description