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

相关推荐
wuyikeer29 分钟前
Java进阶(ElasticSearch的安装与使用)
java·elasticsearch·jenkins
我爱学习好爱好爱2 小时前
Logstash 数据管道测试案例:从 Filebeat 接收日志并输出至黑屏幕与 Elasticsearch(基于Rocky Linux 9.6)
大数据·linux·elasticsearch
李少兄7 小时前
IntelliJ IDEA 中撤销 Commit
java·elasticsearch·intellij-idea
qq_437100668 小时前
ElasticSearch相关记录
大数据·前端·javascript·elasticsearch·全文检索
逸Y 仙X8 小时前
文章六:ElasticSearch 映射配置与字段类型详解
大数据·elasticsearch·搜索引擎
Elastic 中国社区官方博客9 小时前
使用 Elasticsearch 进行实体解析,第 4 部分:终极挑战
大数据·人工智能·elasticsearch·搜索引擎·ai·全文检索
放下华子我只抽RuiKe51 天前
AI大模型开发-实战精讲:从零构建 RFM 会员价值模型(再进阶版:模拟数据 + 动态打分 + 策略落地)
大数据·人工智能·深度学习·elasticsearch·机器学习·搜索引擎·全文检索
Elastic 中国社区官方博客1 天前
Elasticsearch Serverless 的无状态架构
大数据·数据库·elasticsearch·搜索引擎·云原生·架构·serverless
春日见1 天前
自动驾驶流派
大数据·人工智能·深度学习·elasticsearch·搜索引擎