我正在运行 ElasticSearch 版本 6.2.3,并且我将 config\jvm.options
文件中的堆大小增加到 4GB。然后重新启动我的 ES,我如何确保我的 ES 正在使用修改后的堆大小运行。有没有命令可以验证ES的heap-size。
我正在 Windows 机器上运行我的 ES。
请查找我的配置详细信息。
## JVM configuration
################################################################
## IMPORTANT: JVM heap size
################################################################
##
## You should always set the min and max JVM heap
## size to the same value. For example, to set
## the heap to 4 GB, set:
##
## -Xms2g
## -Xmx2g
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
## for more information
##
################################################################
# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space
-Xms4g
-Xmx4g
最佳答案
您可以使用_cat/nodes
端点找出每个节点使用的堆大小。
它看起来像下面这样:
host=localhost:9200 #replace with your Elasticsearch URL
curl $host/_cat/nodes?h=heap*
这将返回如下所示的输出:
554.8mb 30 1.8gb
850.9mb 46 1.8gb
1.7gb 95 1.8gb
这里的第 1 列是 heap.current,又名已用堆。
这里的第 2 列是 heap.percent,又名已用堆百分比。
这里的第 3 列是 heap.max,又名节点可用的最大堆。
h
查询字符串参数允许您选择要显示的列名称。我们使用 *
通配符扩展到以堆前缀开头的所有列。
您可以阅读此处的文档以了解更多信息:https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodes.html .
关于java - 我们如何验证运行 ElasticSearch 的堆大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51340788/