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即可。

相关推荐
Elastic 中国社区官方博客1 小时前
Elastic 在 AWS re:Invent:总结一年在 agentic AI 创新中的合作
大数据·人工智能·elasticsearch·搜索引擎·云计算·全文检索·aws
叮咚侠1 小时前
将已创建的Elasticsearch 8.12.0的docker容器中的数据挂载到宿主机操作步骤
运维·elasticsearch·docker·容器·kibana
liliangcsdn2 小时前
elasticsearch多字段组合查询示例
大数据·elasticsearch·搜索引擎
野生技术架构师2 小时前
SpringBoot+Elasticsearch实现高效全文搜索
spring boot·elasticsearch·jenkins
武子康2 小时前
大数据-189 Nginx JSON 日志接入 ELK:ZK+Kafka+Elasticsearch 7.3.0+Kibana 实战搭建
大数据·后端·elasticsearch
小兜全糖(xdqt)2 小时前
.net 8 添加swagger以及批量index,批量删除 elasticsearch
elasticsearch·jenkins·.net
Elasticsearch17 小时前
Elasticsearch:构建一个 AI 驱动的电子邮件钓鱼检测
elasticsearch
alan072118 小时前
【Java + Elasticsearch全量 & 增量同步实战】
java·elasticsearch·jenkins
Elastic 中国社区官方博客19 小时前
Elasticsearch:你是说,用于混合搜索(hybrid search)
大数据·数据库·人工智能·elasticsearch·搜索引擎·ai·全文检索
Elastic 中国社区官方博客1 天前
在 Kibana 中可视化你的 Bosch Smart Home 数据
大数据·运维·elasticsearch·搜索引擎·信息可视化·全文检索·kibana