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

相关推荐
transitory_truth3 小时前
es-api介绍
elasticsearch
q***471810 小时前
使用Canal将MySQL数据同步到ES(Linux)
linux·mysql·elasticsearch
...对方正在输入......13 小时前
Elasticsearch集群部署实战指南
elasticsearch·jenkins
Hello.Reader14 小时前
使用 Flink CDC 搭建跨库 Streaming ETLMySQL + Postgres → Elasticsearch 实战
大数据·elasticsearch·flink
Elasticsearch15 小时前
Elastic AI agent builder 介绍(五)- 备份 tools 及 agents
elasticsearch
练习时长一年17 小时前
git常用命令总结
大数据·git·elasticsearch
little_xianzhong2 天前
把一个本地项目导入gitee创建的仓库中
大数据·elasticsearch·gitee
哈__2 天前
exa 在 HarmonyOS 上的构建与适配
elasticsearch·华为·harmonyos
Hello.Reader2 天前
Flink CDC 用 Oracle CDC 实时同步数据到 Elasticsearch
elasticsearch·oracle·flink