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

相关推荐
阿里云大数据AI技术1 天前
云栖实录 | 阿里云助力金山办公打造智能搜索新标杆:WPS云文档搜索技术全面升级
人工智能·elasticsearch·搜索引擎
会飞的小蛮猪1 天前
ELK运维之路(定时清理索引)
elasticsearch·kibana·logstash
Elasticsearch1 天前
使用 Elasticsearch 和 Microsoft 的 Agent Framework 构建智能代理应用
elasticsearch
阿Y加油吧1 天前
快速入门elasticsearch
elasticsearch
Elastic 中国社区官方博客1 天前
在 Elastic Observability 中,启用 TSDS 集成可节省高达 70% 的指标存储
大数据·运维·数据库·elasticsearch·搜索引擎·全文检索·时序数据库
半梦半醒*1 天前
ELK2——logstash
linux·运维·elk·elasticsearch·centos·1024程序员节
会飞的小蛮猪1 天前
ELK运维之路(Logstash-插件)
运维·经验分享·elk·elasticsearch·logstash
半梦半醒*1 天前
ELK3——kibana
linux·运维·elasticsearch·centos·gitlab
CodeAmaz1 天前
ELK(Elasticsearch + Logstash + Kibana + Filebeat)采集方案
java·elk·elasticsearch·1024程序员节