# Indices recovery speed is strange

**URL:** https://discuss.elastic.co/t/indices-recovery-speed-is-strange/119590
**Category:** Elasticsearch
**Created:** [February 13, 2018, 7:50am UTC](https://discuss.elastic.co/t/indices-recovery-speed-is-strange/119590 "2018-02-13T07:50:41Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![junkainiu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/junkainiu/32/23928_2.png) [@junkainiu](https://discuss.elastic.co/u/junkainiu)
#### Post date: [February 13, 2018, 7:50am UTC](https://discuss.elastic.co/t/indices-recovery-speed-is-strange/119590/1 "2018-02-13T07:50:41Z")

</div>

Hi, this situation happens when I am testing the elatsicsearch recovery speed. I use elasticsearch 5.3.0 as a one node cluster and a heap size of 3G. Indices are like this:

```
green open fulleth_smartprobe2_nic0_4h_2018010304 As0aPKxlScKpWFgnY30ZTQ 1 0 600000 0 131.6mb 131.6mb
green open fulleth_smartprobe3_nic0_4h_2018010116 SPCef_8IQd27dD2C-SeixQ 1 0 315000 0 69.4mb 69.4mb
green open fulleth_smartprobe0_nic0_4h_2018010416 60HsxuA_TYqu9PUqqcrKqw 1 0 600000 0 131.5mb 131.5mb
green open fulleth_smartprobe3_nic0_4h_2018010400 TiWk16DpRZSDRV7a8gxaoA 1 0 600000 0 130.6mb 130.6mb
green open fulleth_smartprobe0_nic0_4h_2018010304 hRavNJEbQJuDbRqSo4QOOA 1 0 600000 0 132.1mb 132.1mb
green open fulleth_smartprobe1_nic0_4h_2018010400 AFZNjKPpRNKwPGyDVyW6aQ 1 0 600000 0 131.6mb 131.6mb
green open fulleth_smartprobe3_nic0_4h_2018010100 lCNHIt_2RE2-ghJcLpnl1A 1 0 600000 0 132.2mb 132.2mb
green open fulleth_smartprobe1_nic0_4h_2018010120 hMunDg7TTraEeasTZbIMIg 1 0 600000 0 131.6mb 131.6mb
green open fulleth_smartprobe1_nic0_4h_2018010304 ux-3YlAdRK69d8i7LubROA 1 0 600000 0 131.7mb 131.7mb
green open fulleth_smartprobe2_nic0_4h_2018010208 0PzF_5sRRjaB4v1jDsxraQ 1 0 600000 0 131.7mb 131.7mb

```

I totally have 93 indices, most of which have the same size (for testing). Other settings are default settings. The first time I use _systemctl restart elasticsearch_ to restart the cluster, it will cost about 120secs. Then I clear use _echo 3 \> /proc/sys/vm/drop\_caches_ to clear all linux caches and restart the cluster again. This time it only costs about 25s.

After that, I modify _indices.recovery.max\_bytes\_per\_sec_, change the value to 120MB, or 2 MB, but it still costs about 25s to finsh recovery.

So there are two questions, why the first restart is much more slower than others? Why the _indices.recovery.max\_bytes\_per\_sec_ dose not work? Thanks.

```auto
{
  "acknowledged" : true,
  "persistent" : {
    "indices" : {
      "recovery" : {
        "max_bytes_per_sec" : "120mb"
      }
    }
  },
  "transient" : { }
}

```

---

<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: [February 13, 2018, 8:31am UTC](https://discuss.elastic.co/t/indices-recovery-speed-is-strange/119590/2 "2018-02-13T08:31:53Z")

</div>

Are you using hourly indices? It looks like you have a lot of very small indices and shards, which can be very inefficient and result in a large cluster state. Read [this blog post around shards and sharding](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster) for some guidance.

---

<div class="post-metadata">

### Author: ![junkainiu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/junkainiu/32/23928_2.png) [@junkainiu](https://discuss.elastic.co/u/junkainiu)
#### Post date: [February 13, 2018, 8:44am UTC](https://discuss.elastic.co/t/indices-recovery-speed-is-strange/119590/3 "2018-02-13T08:44:37Z")

</div>

Thanks for the reply.  
I use small indices and shards because it is easier to test the recovery speed. I am using the suggested sharding strategy(less than 500 shards, each 20-40 GB size for a 32GB heap) In production. This cluster is made for testing the recovery speed, so I create it with small size to test the recovery.

---

<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: [March 13, 2018, 8:44am UTC](https://discuss.elastic.co/t/indices-recovery-speed-is-strange/119590/4 "2018-03-13T08:44:38Z")

</div>

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