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

相关推荐
一个向上的运维者42 分钟前
实战解析|EFK 日志系统数据同步问题全解(附核心配置模板)
elasticsearch·云原生
cicada152 小时前
分享一个git日常开发流程
大数据·git·elasticsearch
_oP_i2 小时前
Windows 下往 Elasticsearch 添加数据
大数据·windows·elasticsearch
咕叽咕叽的汪3 小时前
Es/Kibana7.17.9中数据迁移到openSearch3.4.0【DockerDesktop模拟】
运维·spring boot·elasticsearch·docker·容器·devops
萧曵 丶3 小时前
Elasticsearch 高频面试题(高级 Java 开发版)
java·elasticsearch
SpaceAIGlobal3 小时前
基于 Elasticsearch 实现排序沉底与前置的方法解析
大数据·elasticsearch·搜索引擎
invicinble4 小时前
认识es的多个维度
android·大数据·elasticsearch
极客先躯14 小时前
如何自动提取Git指定时间段的修改文件?Win/Linux双平台解决方案
linux·git·elasticsearch
Elastic 中国社区官方博客17 小时前
Elastic:DevRel 通讯 — 2026 年 1 月
大数据·数据库·人工智能·elasticsearch·搜索引擎·ai·全文检索
Elastic 中国社区官方博客20 小时前
jina-embeddings-v3 现已在 Elastic Inference Service 上可用
大数据·人工智能·elasticsearch·搜索引擎·ai·jina