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

相关推荐
想躺平的咸鱼干4 小时前
用idea进行数据同步
java·ide·后端·elasticsearch·中间件·intellij-idea
Elastic 中国社区官方博客2 天前
使用 Azure LLM Functions 与 Elasticsearch 构建更智能的查询体验
大数据·人工智能·elasticsearch·microsoft·搜索引擎·全文检索·azure
Mr.stupidCoder3 天前
Git将本地文件推送到GitHub仓库
git·elasticsearch·github
RocketJ3 天前
mac电脑.sh文件,用来清除git当前分支
git·elasticsearch·macos
Elastic 中国社区官方博客3 天前
JavaScript 中的 ES|QL:利用 Apache Arrow 工具
大数据·开发语言·javascript·elasticsearch·搜索引擎·全文检索·apache
猕员桃3 天前
《Elasticsearch 分布式搜索在聊天记录检索中的深度优化》
分布式·elasticsearch·wpf
追随远方3 天前
Android OpenSL ES 音频播放完整实现指南
android·elasticsearch·音视频
G皮T4 天前
【Elasticsearch】正排索引、倒排索引(含实战案例)
大数据·elasticsearch·搜索引擎·kibana·倒排索引·搜索·正排索引
G皮T4 天前
【Elasticsearch】Elasticsearch 近实时高速查询原理
大数据·elasticsearch·搜索引擎·全文检索·倒排索引·搜索·nrt
aini_lovee4 天前
python在容器内克隆拉取git私有仓库
git·python·elasticsearch