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

相关推荐
阿拉斯攀登1 小时前
向量数据库选型:Milvus vs Chroma vs Elasticsearch
数据库·elasticsearch·milvus·知识库·rag·个人知识库
江畔柳前堤7 小时前
第15章:docker故障排查与面试题
大数据·运维·git·elasticsearch·docker·容器·eureka
江畔柳前堤7 小时前
第07章:Docker 网络模型
运维·网络·git·elasticsearch·docker·容器·架构
Elasticsearch1 天前
深入解析 simdvec:Elasticsearch 如何利用神经网络和视频编解码 CPU 指令实现向量搜索
elasticsearch
Elasticsearch2 天前
一条命令。自然语言。你的 Elasticsearch 数据,直接进入终端
elasticsearch
vivo互联网技术2 天前
从 10 分钟到 1 秒:ES 深度分页任意跳页的三轮优化实战
服务器·数据库·redis·elasticsearch·深度分页
Elasticsearch2 天前
热力直达:使用 Elasticsearch 插件将 ES|QL 引入你的 Grafana 仪表板
elasticsearch
小猿姐3 天前
唯品会大规模数据库云原生实践:基于 KubeBlocks 管理数千实例的统一运维之路
运维·elasticsearch·云原生
Elasticsearch3 天前
使用 Elastic Agent Builder 和 Sarvam AI 构建多语言语音 agent
elasticsearch