# Shard size issue in elastic

**URL:** <https://discuss.elastic.co/t/shard-size-issue-in-elastic/273760>\
**Category:** Elasticsearch\
**Created:** [May 23, 2021, 2:05pm UTC](https://discuss.elastic.co/t/shard-size-issue-in-elastic/273760 "2021-05-23T14:05:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Muna](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@Muna](https://discuss.elastic.co/u/Muna)\
**Post date:** [May 23, 2021, 2:05pm UTC](https://discuss.elastic.co/t/shard-size-issue-in-elastic/273760/1 "2021-05-23T14:05:08Z")

</div>

How to configure the optimal shard size in elastic search?

I've gone through multiple posts in this forum and I'm not able to find an exact way to calculate the optimal value for cluster.max\_shards\_per\_node

Increasing this max\_shards\_per\_node as temporary fix is working but as more index gets logged into elastic, the same issues occurs.

For instance say we have 1000 indices, 5 shards per node and 50gb disk space, what would be the optimal value for cluster.max\_shards\_per\_node ?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/6/3642a93c1e45c696a742ac3499ccd6430cfdb47b.png)

---

<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:** [May 23, 2021, 3:12pm UTC](https://discuss.elastic.co/t/shard-size-issue-in-elastic/273760/2 "2021-05-23T15:12:39Z")

</div>

Aim to have shards with an average size of tens of GB. If you only have 50GB storage per node you need single digit shards per node. There is no need to have 5 replicas per index and fewer indices would be better.

---

<div class="post-metadata">

**Author:** ![Muna](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@Muna](https://discuss.elastic.co/u/Muna)\
**Post date:** [May 24, 2021, 1:40pm UTC](https://discuss.elastic.co/t/shard-size-issue-in-elastic/273760/3 "2021-05-24T13:40:26Z")

</div>

Thanks Christian for the suggestion, could you please let me know an approach for setting value to total shards per node?

---

<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:** [May 24, 2021, 1:51pm UTC](https://discuss.elastic.co/t/shard-size-issue-in-elastic/273760/4 "2021-05-24T13:51:11Z")

</div>

You should not override this. It seems you already have though so I would recommend fixing your sharping issue and then set it back to the default value. Further increasing this will most likely just let you get to a situation where you no longer can fix your cluster as cluster updates time out and lose potentially lose all your data as you have to start over from scratch.

---

<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:** [June 21, 2021, 1:51pm UTC](https://discuss.elastic.co/t/shard-size-issue-in-elastic/273760/5 "2021-06-21T13:51:42Z")

</div>

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