elasticsearch 内存大小设置

elasticsearch 内存大小设置

找到elasticsearch的安装目录,然后找到config文件夹,里面都是相关的配置文件。

官方不建议直接修改jvm.options,而是复制jvm.options到jvm.options.d目录下,再修改。

其中,jvm.options可以修改es运行时候的内存分配。打开jvm.options文件,我们可以发现默认设置的内存是4g。

sh 复制代码
################################################################
## IMPORTANT: JVM heap size
################################################################
##
## The heap size is automatically configured by Elasticsearch
## based on the available memory in your system and the roles
## each node is configured to fulfill. If specifying heap is
## required, it should be done through a file in jvm.options.d,
## which should be named with .options suffix, and the min and
## max should be set to the same value. For example, to set the
## heap to 4 GB, create a new file in the jvm.options.d
## directory containing these lines:
##
## -Xms4g
## -Xmx4g
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/8.6/heap-size.html
## for more information
##
###############################################################

将内存修改为你想要的实际大小,保存,重新启动es即可。

相关推荐
寅鸷8 小时前
es里为什么node和shard不是一对一的关系
大数据·elasticsearch
阿里云大数据AI技术16 小时前
如何在 Elasticsearch 中构建你的智能 AI 助手?
运维·人工智能·elasticsearch
risc12345621 小时前
【Lucene/Elasticsearch】**Query Rewrite** 机制
elasticsearch·jenkins·lucene
risc1234561 天前
【Elasticsearch】function_score与rescore
elasticsearch
mit6.8242 天前
[es自动化更新] Updatecli编排配置.yaml | dockerfilePath值文件.yml
大数据·elasticsearch·搜索引擎·自动化
Jinkxs2 天前
Elasticsearch 简介
大数据·elasticsearch·搜索引擎
亮学长2 天前
lodash不支持 Tree Shaking 而 lodash-es可以
大数据·前端·elasticsearch
risc1234562 天前
Elasticsearch 线程池
java·大数据·elasticsearch
jiuweiC2 天前
spark3 streaming 读kafka写es
elasticsearch·kafka·linq
GeminiJM2 天前
Elasticsearch混合搜索深度解析(上):问题发现与源码探索
大数据·elasticsearch·jenkins