ES7 sets the disk usage watermark allocation.disk.watermark

ES7 decides whether to allocate shards based on disk usage

Link to the original text of this article: https://blog.csdn.net/xzk9381/article/details/113252344

The Data node of the company's ES cluster suddenly warned of insufficient disk space. After cleaning up some indexes, it was found that the utilization of the disk was significantly higher than the average value of other nodes in the ES cluster, which means that the ES cluster shard distribution was unbalanced. In addition to letting the cluster automatically optimize the balance, you can also set the disk space watermark so that ES can decide whether to continue to allocate shards based on the disk usage.

Use the following command to set the water mark:

PUT _cluster/settings
{
    
    
   "transient":{
    
    
      "cluster.routing.allocation.disk.watermark.high":"75%",
      "cluster.routing.allocation.disk.watermark.low":"70%"
    }
}
  • cluster.routing.allocation.disk.watermark.low: When the disk usage reaches the specified value, it will stop allocating new shards. You can also set a value, such as 600M
  • cluster.routing.allocation.disk.watermark.high: When the disk usage reaches the specified value, es will r elocate shard to other nodes. You can also set a value

Use GET _cluster/settingscommand to view the current settings:

{
    
    
  "persistent" : {
    
    
    "indices" : {
    
    
      "lifecycle" : {
    
    
        "poll_interval" : "600s"
      }
    },
    "search" : {
    
    
      "max_buckets" : "100000"
    }
  },
  "transient" : {
    
    
    "cluster" : {
    
    
      "routing" : {
    
    
        "allocation" : {
    
    
          "disk" : {
    
    
            "watermark" : {
    
    
              "low" : "70%",
              "high" : "75%"
            }
          }
        }
      }
    }
  }
}

Link to the original text of this article: https://blog.csdn.net/xzk9381/article/details/113252344

Guess you like

Origin blog.csdn.net/xzk9381/article/details/113252344