首页 > 其他 > 详细

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

时间:2020-05-11 18:31:34      阅读:140      评论:0      收藏:0      [点我收藏+]

 

【 配置内核设置 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

 

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

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

原文:https://www.cnblogs.com/farwish/p/12870381.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!