您的位置:首页 > 其它

elasticsearch log中显示 low disk watermark [15%],high disk watermark [10%]

2017-07-30 00:00 726 查看
elasticsearch log中显示 low disk watermark [15%],high disk watermark [10%]的原因

[2015-10-27 09:38:31,588][INFO ][node                     ] [Milan] version[1.4.4], pid[33932], build[c88f77f/2015-02-19T13:05:36Z]
[2015-10-27 09:38:31,588][INFO ][node                     ] [Milan] initializing ...
[2015-10-27 09:38:31,592][INFO ][plugins                  ] [Milan] loaded [], sites []
[2015-10-27 09:38:34,665][INFO ][node                     ] [Milan] initialized
[2015-10-27 09:38:34,665][INFO ][node                     ] [Milan] starting ...
[2015-10-27 09:38:34,849][INFO ][transport                ] [Milan] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/10.81.1.108:9300]}
[2015-10-27 09:38:35,022][INFO ][discovery                ] [Milan] elasticsearch/DZqnmWIZRpapZY_TPkkMBw
[2015-10-27 09:38:38,787][INFO ][cluster.service          ] [Milan] new_master [Milan][DZqnmWIZRpapZY_TPkkMBw][THINKANDACT1301][inet[/10.81.1.108:9300]], reason: zen-disco-join (elected_as_master)
[2015-10-27 09:38:38,908][INFO ][http                     ] [Milan] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/10.81.1.108:9200]}
[2015-10-27 09:38:38,908][INFO ][node                     ] [Milan] started
[2015-10-27 09:38:39,220][INFO ][gateway                  ] [Milan] recovered [4] indices into cluster_state
[2015-10-27 09:39:08,801][INFO ][cluster.routing.allocation.decider] [Milan] low disk watermark [15%] exceeded on [DZqnmWIZRpapZY_TPkkMBw][Milan] free: 58.6gb[12.6%], replicas will not be assigned to this node
[2015-10-27 09:39:38,798][INFO ][cluster.routing.allocation.decider] [Milan] low disk watermark [15%] exceeded on [DZqnmWIZRpapZY_TPkkMBw][Milan] free: 58.6gb[12.6%], replicas will not be assigned to this node
[2015-10-27 09:40:08,801][INFO ][cluster.routing.allocation.decider] [Milan] low disk watermark [15%] exceeded on [DZqnmWIZRpapZY_TPkkMBw][Milan] free: 58.6gb[12.6%], replicas will not be assigned to this node

这是ES中的磁盘分配决策策略(disk allocation decider),在ES中的官方文档中描述如下:

cluster.routing.allocation.disk.threshold_enabled:
Defaults to true. Set to false to disable the disk allocation decider.

cluster.routing.allocation.disk.watermark.low:
Controls the low watermark for disk usage. It defaults to 85%, meaning ES will not allocate new shards to nodes once they have more than 85% disk used. It can also be set to an absolute byte value (like 500mb) to prevent ES from allocating shards if less than the configured amount of space is available.

cluster.routing.allocation.disk.watermark.high:
Controls the high watermark. It defaults to 90%, meaning ES will attempt to relocate shards to another node if the node disk usage rises above 90%. It can also be set to an absolute byte value (similar to the low watermark) to relocate shards once less than the configured amount of space is available on the node.

cluster.info.update.interval
How often Elasticsearch should check on disk usage for each node in the cluster. Defaults to 30s.

low disk watermark默认为85%,意味着该节点如果磁盘空间小于85%,那么该节点不会再分配新的分片,只会添加一些零散的文件;

high disk watermark默认为90%,意味着该节点如果磁盘空间小于90%,那么ES会尝试重新分配分片,将该节点的分片移动到其他节点。

这两个参数都可以通过设置来改变,可以设置为百分比,也可以设置为绝对值:

PUT _cluster/settings
{
"transient": {
"cluster.routing.allocation.disk.watermark.low": "80%",
"cluster.routing.allocation.disk.watermark.high": "50gb",
"cluster.info.update.interval": "1m"
}
}

另外,"cluster.info.update.interval"表示 ES多久检查一次磁盘空间占比,默认为30
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ElasticSearch watermark