# Replica allocation concurrent setting

**URL:** https://discuss.elastic.co/t/replica-allocation-concurrent-setting/361313
**Category:** Elasticsearch
**Created:** [June 12, 2024, 9:31am UTC](https://discuss.elastic.co/t/replica-allocation-concurrent-setting/361313 "2024-06-12T09:31:02Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![chrwhy](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@chrwhy](https://discuss.elastic.co/u/chrwhy)
#### Post date: [June 12, 2024, 9:31am UTC](https://discuss.elastic.co/t/replica-allocation-concurrent-setting/361313/1 "2024-06-12T09:31:02Z")

</div>

Does anybody know what the replica concurrent setting is?

I just set the number\_of\_replicas from 0 to 1 in a production environment with the below settings:  
cluster.routing.allocation.cluster\_concurrent\_rebalance": "10"  
cluster.routing.allocation.node\_concurrent\_recoveries": "2"

I expected there to be a max 10 replica shards allocation, but instead, there were almost 100 shard allocation tasks triggered which caused severe  
impact on the online search, and I want to know the exact settings for replica allocation.

thanks.

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [June 12, 2024, 10:26am UTC](https://discuss.elastic.co/t/replica-allocation-concurrent-setting/361313/2 "2024-06-12T10:26:27Z")

</div>

> [@chrwhy](#):
>
> cluster.routing.allocation.cluster\_concurrent\_rebalance": "10"

See [the docs for this setting](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-cluster.html#shards-rebalancing-settings), particularly:

> Increasing this setting may cause the cluster to use additional resources moving shards between nodes, so we generally do not recommend adjusting this setting from its default of `2` .

---

<div class="post-metadata">

### Author: ![chrwhy](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@chrwhy](https://discuss.elastic.co/u/chrwhy)
#### Post date: [June 13, 2024, 2:54am UTC](https://discuss.elastic.co/t/replica-allocation-concurrent-setting/361313/3 "2024-06-13T02:54:59Z")

</div>

yeah, I have learned the lesson,  
but I am still confused about why the concurrent allocation tasks were not as expected max 10

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [June 13, 2024, 3:46am UTC](https://discuss.elastic.co/t/replica-allocation-concurrent-setting/361313/4 "2024-06-13T03:46:06Z")

</div>

I'm not sure, but `cluster_concurrent_rebalance` only limits the number of _rebalancing_ shard movements in the cluster, there are lots of other reasons for shard allocations. Could you share the output from `GET _recovery` from the time of the problem?

---

<div class="post-metadata">

### Author: ![chrwhy](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@chrwhy](https://discuss.elastic.co/u/chrwhy)
#### Post date: [June 18, 2024, 1:19am UTC](https://discuss.elastic.co/t/replica-allocation-concurrent-setting/361313/5 "2024-06-18T01:19:17Z")

</div>

hmmm, sorry, I am afraid I can't, cause there is sensitive information can't be shared.

Actually, I just want to know what are the related concurrent settings for replica shards allocation

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [June 18, 2024, 5:01am UTC](https://discuss.elastic.co/t/replica-allocation-concurrent-setting/361313/6 "2024-06-18T05:01:25Z")

</div>

`cluster.routing.allocation.node_concurrent_recoveries` limits the number of replicas recovering on a node at once.

---

<div class="post-metadata">

### Author: ![chrwhy](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@chrwhy](https://discuss.elastic.co/u/chrwhy)
#### Post date: [June 18, 2024, 5:24am UTC](https://discuss.elastic.co/t/replica-allocation-concurrent-setting/361313/7 "2024-06-18T05:24:01Z")

</div>

Got it, thank you so much.
