# Create/delete index goes slow when shards number up to 10000

**URL:** https://discuss.elastic.co/t/create-delete-index-goes-slow-when-shards-number-up-to-10000/80083
**Category:** Elasticsearch
**Created:** [March 27, 2017, 7:47am UTC](https://discuss.elastic.co/t/create-delete-index-goes-slow-when-shards-number-up-to-10000/80083 "2017-03-27T07:47:59Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![hooooly](https://avatars.discourse-cdn.com/v4/letter/h/94ad74/32.png) [@hooooly](https://discuss.elastic.co/u/hooooly)
#### Post date: [March 27, 2017, 7:47am UTC](https://discuss.elastic.co/t/create-delete-index-goes-slow-when-shards-number-up-to-10000/80083/1 "2017-03-27T07:47:59Z")

</div>

create indexes with 30 shards one by one,when shards number up to 10000 in elasticsearch cluster,i found creation operation goes very slow.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 27, 2017, 8:16am UTC](https://discuss.elastic.co/t/create-delete-index-goes-slow-when-shards-number-up-to-10000/80083/2 "2017-03-27T08:16:00Z")

</div>

Why do you want to create so many shards? Do you have more than 100 data nodes?

---

<div class="post-metadata">

### Author: ![hooooly](https://avatars.discourse-cdn.com/v4/letter/h/94ad74/32.png) [@hooooly](https://discuss.elastic.co/u/hooooly)
#### Post date: [March 27, 2017, 12:52pm UTC](https://discuss.elastic.co/t/create-delete-index-goes-slow-when-shards-number-up-to-10000/80083/3 "2017-03-27T12:52:00Z")

</div>

30 data nodes,we have more than 600 index.

---

<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: [March 27, 2017, 12:56pm UTC](https://discuss.elastic.co/t/create-delete-index-goes-slow-when-shards-number-up-to-10000/80083/4 "2017-03-27T12:56:35Z")

</div>

Which version of Elasticsearch are you using? Do you have dedicated master nodes? What is the average shard size?

---

<div class="post-metadata">

### Author: ![hooooly](https://avatars.discourse-cdn.com/v4/letter/h/94ad74/32.png) [@hooooly](https://discuss.elastic.co/u/hooooly)
#### Post date: [March 27, 2017, 1:07pm UTC](https://discuss.elastic.co/t/create-delete-index-goes-slow-when-shards-number-up-to-10000/80083/5 "2017-03-27T13:07:59Z")

</div>

yes ,we have dedicated master nodes. average shard size is small,we just created index, the data is not in yet,it looks like there is no matter with shard size. we used Elasticsearch 2.0.

---

<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: [March 27, 2017, 1:11pm UTC](https://discuss.elastic.co/t/create-delete-index-goes-slow-when-shards-number-up-to-10000/80083/6 "2017-03-27T13:11:47Z")

</div>

If the shards are small, why do you need a primary shard per node? Do you know how much data the indices will hold?

---

<div class="post-metadata">

### Author: ![hooooly](https://avatars.discourse-cdn.com/v4/letter/h/94ad74/32.png) [@hooooly](https://discuss.elastic.co/u/hooooly)
#### Post date: [March 27, 2017, 1:14pm UTC](https://discuss.elastic.co/t/create-delete-index-goes-slow-when-shards-number-up-to-10000/80083/7 "2017-03-27T13:14:24Z")

</div>

One index will hold 600G,so we set 30 shards to a index.

---

<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: [March 27, 2017, 1:18pm UTC](https://discuss.elastic.co/t/create-delete-index-goes-slow-when-shards-number-up-to-10000/80083/8 "2017-03-27T13:18:15Z")

</div>

If the index holds 600GB of data, 30 primary shards might be a reasonable starting point as that is 20GB per shard. Will all indices hold the same amount of data? If not, I would recommend setting up smaller indices with fewer primary shards.

What is the use case?

---

<div class="post-metadata">

### Author: ![hooooly](https://avatars.discourse-cdn.com/v4/letter/h/94ad74/32.png) [@hooooly](https://discuss.elastic.co/u/hooooly)
#### Post date: [March 27, 2017, 1:24pm UTC](https://discuss.elastic.co/t/create-delete-index-goes-slow-when-shards-number-up-to-10000/80083/9 "2017-03-27T13:24:30Z")

</div>

Actually,it will. Do you have some idea?

---

<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: [March 27, 2017, 1:50pm UTC](https://discuss.elastic.co/t/create-delete-index-goes-slow-when-shards-number-up-to-10000/80083/10 "2017-03-27T13:50:07Z")

</div>

> [@hooooly](#):
>
> Do you have some idea?

I am not sure I am following what you are referring to.

What is the specification with respect to CPU and RAM for your dedicated master nodes?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 27, 2017, 2:18pm UTC](https://discuss.elastic.co/t/create-delete-index-goes-slow-when-shards-number-up-to-10000/80083/11 "2017-03-27T14:18:49Z")

</div>

> [@hooooly](#):
>
> we used Elasticsearch 2.0

Upgrade. Many things changed since then.

---

<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: [April 24, 2017, 2:19pm UTC](https://discuss.elastic.co/t/create-delete-index-goes-slow-when-shards-number-up-to-10000/80083/12 "2017-04-24T14:19:15Z")

</div>

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