[ELK] 生产环境使用 Elasticsearch Docker 镜像的优化选项

通过llama.cpp与羊驼聊天的网页界面- 详解 Serge 的启动使用

 

【 配置内核设置 vm.max_map_count 至少为 262144 】

https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_configuration_files_must_be_readable_by_the_elasticsearch_user

 

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#_randomize_published_ports

 

【 设置堆大小 】

https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-set-heap-size

 

【 部署固定版本的镜像 】

https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_pin_deployments_to_a_specific_image_version

 

【 总是绑定数据 volumes 】

https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_always_bind_data_volumes

 

【 避免使用 loop_lvm 模式 】

https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_avoid_using_loop_lvm_mode

 

【 集中你的日志 】

https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_centralize_your_logs

 

【 Docker 下的 ElasticSearch 配置 】

https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-configuration-methods

 

【 挂载 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

 

Other:Docker游乐场

Link:https://www.cnblogs.com/farwish/p/12870381.html

posted on 2020-05-11 17:20  ercom  阅读(1075)  评论(0编辑  收藏  举报