【 配置內核設置 vm.max_map_count 至少為 262144 】
Linux:
echo vm.max_map_count=262144 >> /etc/sysctl.conf
sysctl -w vm.max_map_count=262144
macOS with Docker for Mac:
screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
sysctl -w vm.max_map_count=262144
Windows and macOS with Docker Desktop:
docker-machine ssh
sudo sysctl -w vm.max_map_count=262144
【 配置文件必須為 elasticsearch 用戶可讀 】
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_configuration_files_must_be_readable_by_the_elasticsearch_user
【 提高 ulimits 】
檢查:docker run --rm centos:7 /bin/bash -c 'ulimit -Hn && ulimit -Sn && ulimit -Hu && ulimit -Su'
docker run 設置:--ulimit nofile=65535:65535
【 關閉 swapping:為了性能和節點穩定性 】
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_disable_swapping
【 隨機公開端口 】
【 設置堆大小 】
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-set-heap-size
【 部署固定版本的鏡像 】
【 總是綁定數據 volumes 】
【 避免使用 loop_lvm 模式 】
【 集中你的日志 】
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_centralize_your_logs
【 Docker 下的 ElasticSearch 配置 】
【 掛載 ElasticSearch 配置文件 】
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-config-bind-mount
【 使用自定義 Docker 鏡像 】
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_c_customized_image