# Shard recovery thread count

**URL:** <https://discuss.elastic.co/t/shard-recovery-thread-count/217283>\
**Category:** Elasticsearch\
**Created:** [January 31, 2020, 12:22am UTC](https://discuss.elastic.co/t/shard-recovery-thread-count/217283 "2020-01-31T00:22:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![linkerc](https://avatars.discourse-cdn.com/v4/letter/l/13edae/32.png) [@linkerc](https://discuss.elastic.co/u/linkerc)\
**Post date:** [January 31, 2020, 12:22am UTC](https://discuss.elastic.co/t/shard-recovery-thread-count/217283/1 "2020-01-31T00:22:15Z")

</div>

I have noticed in my cluster that there are maximum of 2 recovery tasks running whenever shard relocation happens.  
Is this a configurable setting?  
I would like to experiment with more threads moving shards to speed up the process.  
Reason being the hard limit seems to prevent new index from assigning replica to a node.  
When I removed some old indices, the cluster goes into a shard balancing mode.  
This is fine. But we have hourly index being created and the replica is being set to unassigned for a prolong period of time, until one of the "recovery/relocation" task is done.  
Is this normal?  
We are running ES 7.4.1

Thanks.

---

<div class="post-metadata">

**Author:** ![miker256](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miker256/32/60563_2.png) [@miker256](https://discuss.elastic.co/u/miker256)\
**Post date:** [January 31, 2020, 1:25am UTC](https://discuss.elastic.co/t/shard-recovery-thread-count/217283/2 "2020-01-31T01:25:06Z")

</div>

Hi @linkerc, This may help you out.

[Index Shard Allocation](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-allocation.html)

[Index shard stores API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shards-stores.html)

[Index recovery API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html)

---

<div class="post-metadata">

**Author:** ![linkerc](https://avatars.discourse-cdn.com/v4/letter/l/13edae/32.png) [@linkerc](https://discuss.elastic.co/u/linkerc)\
**Post date:** [January 31, 2020, 1:48am UTC](https://discuss.elastic.co/t/shard-recovery-thread-count/217283/3 "2020-01-31T01:48:06Z")

</div>

Thanks.  
Unfortunately, they don't help.  
Those are just providing info on recovery tasks.  
I am looking for a way to increase the number of simultaneous recovery tasks.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 31, 2020, 6:01am UTC](https://discuss.elastic.co/t/shard-recovery-thread-count/217283/4 "2020-01-31T06:01:45Z")

</div>

I believe this is controlled through the [cluster level shard allocation settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/shards-allocation.html).

---

<div class="post-metadata">

**Author:** ![linkerc](https://avatars.discourse-cdn.com/v4/letter/l/13edae/32.png) [@linkerc](https://discuss.elastic.co/u/linkerc)\
**Post date:** [January 31, 2020, 7:32pm UTC](https://discuss.elastic.co/t/shard-recovery-thread-count/217283/5 "2020-01-31T19:32:59Z")

</div>

> [@Christian\_Dahlqvist](#):
>
> cluster level shard allocation settings

thank for the link.  
I'll digest it further.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 28, 2020, 7:40pm UTC](https://discuss.elastic.co/t/shard-recovery-thread-count/217283/6 "2020-02-28T19:40:58Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
