docker安装elasticsearch内存修改

用docker 安装的elasticsearch默认堆内存最大设置的1G

可以通过如下方法修改

root@cmcn11:/home/slax# find /var/lib/docker/ -name jvm.options

/var/lib/docker/overlay2/3fc47bedfc45c89271dd8914db2272c62fb0a6b954e3a6ce62df783274dbfc45/diff/usr/share/elasticsearch/config/jvm.options

/var/lib/docker/overlay2/fc999a2fe898e1d33f224d49fa4f8b10a34b431aa76807f309299ac9fb0c3b5d/diff/usr/share/logstash-7.8.0/config/jvm.options

/var/lib/docker/overlay2/c23627f1a7ce3ddc0021a8814dde859e49aa4a4a55a9c73e2c192a972b820736/merged/usr/share/elasticsearch/config/jvm.options

然后 vim/var/lib/docker/overlay2/3fc47bedfc45c89271dd8914db2272c62fb0a6b954e3a6ce62df783274dbfc45/diff/usr/share/elasticsearch/config/jvm.options

三节点一样修改

修改里面

-Xms24g

-Xmx24g

然后保存,

然后重启docker 里的 elasticsearch 容器

docker restartelasticsearch

然后启动里面的服务。

你可能感兴趣的:(java,docker,elasticsearch,容器,java,服务器)