# Frozen indices and shard limitation

**URL:** <https://discuss.elastic.co/t/frozen-indices-and-shard-limitation/258702>\
**Category:** Elasticsearch\
**Created:** [December 15, 2020, 11:14am UTC](https://discuss.elastic.co/t/frozen-indices-and-shard-limitation/258702 "2020-12-15T11:14:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Travis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/travis/32/54079_2.png) [@Travis](https://discuss.elastic.co/u/Travis)\
**Post date:** [December 15, 2020, 11:14am UTC](https://discuss.elastic.co/t/frozen-indices-and-shard-limitation/258702/1 "2020-12-15T11:14:12Z")

</div>

Hello all !

I know the number of shards is limited by the amount of heap. For example, on my hot node, I have 30GB of heap so limit is 600 shards on this node (20 shards par GB of heap)

But what about the limit for cold nodes where shards/indices are not accessed frequently ? If, let's say, I have 2000 shards of frozen indices on my cold node, how much amount of heap does I need ?

Does the shards recommended limit apply to cold nodes/frozen indices ?

Thanks for your feedback ! 🙂

---

<div class="post-metadata">

**Author:** ![Travis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/travis/32/54079_2.png) [@Travis](https://discuss.elastic.co/u/Travis)\
**Post date:** [December 15, 2020, 8:06pm UTC](https://discuss.elastic.co/t/frozen-indices-and-shard-limitation/258702/2 "2020-12-15T20:06:08Z")

</div>

Anyone ?

---

<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:** [December 15, 2020, 8:16pm UTC](https://discuss.elastic.co/t/frozen-indices-and-shard-limitation/258702/3 "2020-12-15T20:16:36Z")

</div>

The 20-shards-per-GB-of-heap guideline is a good starting point that came from years of experience of different clusters and different datasets and a bunch of careful experiments. Frozen indices should in theory be somewhat lighter on heap compared to regular indices, but I don't think we have built up enough experience or done enough experiments to give a similarly broad guideline specifically for nodes that only hold frozen indices, sorry.

There are other considerations, e.g. a 600-shard node could represent 30TB of data if the shards target a typical size of ~50GB. If you went to 2000 shards you'd be looking at 100TB per node. Nodes are the unit of failure in a cluster; are you sure you are ok losing 100TB in a single event? It might take days or weeks to recover that much data elsewhere.

---

<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:** [December 15, 2020, 9:12pm UTC](https://discuss.elastic.co/t/frozen-indices-and-shard-limitation/258702/4 "2020-12-15T21:12:07Z")

</div>

Heap usage has been improved in recent versions with the introduction if frozen indices and [more heap efficient handling of document IDs](https://www.elastic.co/blog/significantly-decrease-your-elasticsearch-heap-memory-usage) and this likely means less heap pressure due to shards. It is however not only heap usage that is impacted by the number of indices and shards in a cluster. The more indices and shards you have in a cluster, the larger the cluster state will likely be and it can get slower to update and propagate as it grows. Eventually this may become a bottleneck and cause stability issues. I am sure this is also being worked on and is likely to improve over time and maybe then a new set of guidelines will be made available.

---

<div class="post-metadata">

**Author:** ![Travis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/travis/32/54079_2.png) [@Travis](https://discuss.elastic.co/u/Travis)\
**Post date:** [December 15, 2020, 10:29pm UTC](https://discuss.elastic.co/t/frozen-indices-and-shard-limitation/258702/5 "2020-12-15T22:29:53Z")

</div>

Very interesting ! I will take into account these advices. Thanks a lot @DavidTurner and @Christian_Dahlqvist

---

<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:** [January 12, 2021, 10:30pm UTC](https://discuss.elastic.co/t/frozen-indices-and-shard-limitation/258702/6 "2021-01-12T22:30:00Z")

</div>

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