0%

Elasticsearch important settings

Document important settings we shouldn’t be missing in elasticsearch clusters.

Overview

Cluster settings for ES

Could use Kibana Dev Tool to update cluster settings

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
"persistent" : {
"cluster" : {
"routing" : {
"allocation" : {
"cluster_concurrent_rebalance" : "12",
"node_concurrent_recoveries" : "6",
"disk" : {
"watermark" : {
"high" : "85%"
}
},
"enable" : "all"
}
}
},
"indices" : {
"recovery" : {
"max_bytes_per_sec" : "640mb"
}
}
},
"transient" : {
"cluster" : {
"routing" : {
"allocation" : {
"cluster_concurrent_rebalance" : "12",
"include" : {
"_name" : "elastic-data-*",
"_ip" : ""
},
"node_concurrent_recoveries" : "6",
"balance" : {
"threshold" : "1.0f"
},
"enable" : "all"
}
}
},
"indices" : {
"recovery" : {
"max_bytes_per_sec" : "640mb"
}
}
}
}

indices.recovery.max_bytes_per_sec

Defaults to 40mb. Increasing to 320mb increases throughput

1
2
3
4
5
6
curl -X PUT "localhost:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d'
{
"persistent" : {
"indices.recovery.max_bytes_per_sec" : "320mb"
}
}'

cluster.routing.allocation.cluster_concurrent_rebalance

By default ES will only move 2 shards at any given time.

To increase recovery speeds and shard rebalancing we should bump this up.

1
2
3
4
5
curl -XPUT localhost:9200/_cluster/settings?pretty -H 'Content-Type: application/json' -d '{
"persistent" : {
"cluster.routing.allocation.cluster_concurrent_rebalance": 12
}
}'

Welcome to my other publishing channels