如何在ElasticSearch上使用最大4GB的内存?

问题描述 投票:1回答:1

我正在尝试优化Elastic Search中的内存使用,以便在macOS上使用最大4GB。我知道以下代码适用于Windows,但是当我在Mac上运行它时它不起作用:

./elasticsearch -Xmx4g -Xms4g

在Mac上运行它时会显示以下消息:

ERROR: Parameter [-Xmx4g]does not start with --

我试图在没有“ - ”的情况下运行它仍然无效。

有关如何在Mac上运行它的任何想法?

macos elasticsearch memory-management
1个回答
0
投票

请尝试使用此命令

ES_JAVA_OPTS="-Xms4g -Xmx4g" ./bin/elasticsearch

或者使用jazm.wtions文件中提到的here

资料来源:https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.