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

相关推荐
光仔December1 小时前
【Elasticsearch入门到落地】13、DSL查询详解:分类、语法与实战场景
大数据·elasticsearch·搜索引擎·全文检索·dsl语法
谷晓光3 小时前
在Mac中使用pyenv管理Python版本:从安装到虚拟环境的全流程指南
python·elasticsearch·macos
risc1234569 小时前
【Elasticsearch】给所索引创建多个别名
elasticsearch
搞不懂语言的程序员11 小时前
如何保证 Kafka 数据实时同步到 Elasticsearch?
分布式·elasticsearch·kafka
不爱学英文的码字机器13 小时前
[Git] 如何进行版本回退
大数据·git·elasticsearch
福如意如我心意14 小时前
ElasticSearch各种查询语法示例
elasticsearch
搞不懂语言的程序员1 天前
Elasticsearch简单集成java框架方式。
java·大数据·elasticsearch
hqxstudying1 天前
Elasticsearch知识点
elasticsearch
DBWYX2 天前
从零启动 Elasticsearch
大数据·elasticsearch·搜索引擎
胡尔摩斯.2 天前
ElasticSearch操作
大数据·elasticsearch·jenkins