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

相关推荐
程序员梅雨30 分钟前
微服务学习最终篇: Elasticsearch
学习·elasticsearch·微服务
Elasticsearch34 分钟前
教程:使用 ES|QL 进行威胁狩猎
elasticsearch
智搜广告2 小时前
GEO优化公司怎么选?智搜广告从三个维度帮你判断
大数据·人工智能·python·elasticsearch·microsoft·geo
Elastic 中国社区官方博客3 小时前
Elasticsearch:ES|QL 搜索教程
大数据·数据库·人工智能·sql·elasticsearch·搜索引擎·全文检索
Elasticsearch4 小时前
Elasticsearch 中的查询重写规则:通配符扫描速度提升 2.3 倍
elasticsearch
Elasticsearch4 小时前
隐藏在可观测性数据中的安全攻击
elasticsearch
Elasticsearch18 小时前
Elasticsearch:ES|QL 搜索教程
elasticsearch
玖石书1 天前
Git Submodule 完全指南:从添加到日常维护的常规操作全流程
大数据·git·elasticsearch
晴天161 天前
ES 标准、V8 引擎与 Node.js 版本联动关系全解与实战踩坑
大数据·elasticsearch·node.js
考虑考虑2 天前
ElasticSearch索引命令
运维·后端·elasticsearch