# How much heap memory need for elasticsearch data nodes

**URL:** https://discuss.elastic.co/t/how-much-heap-memory-need-for-elasticsearch-data-nodes/262773
**Category:** Elasticsearch
**Created:** [January 31, 2021, 11:56pm UTC](https://discuss.elastic.co/t/how-much-heap-memory-need-for-elasticsearch-data-nodes/262773 "2021-01-31T23:56:13Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)
#### Post date: [January 31, 2021, 11:56pm UTC](https://discuss.elastic.co/t/how-much-heap-memory-need-for-elasticsearch-data-nodes/262773/1 "2021-01-31T23:56:13Z")

</div>

I am runnig 8 node cluster (3 Master+3 data+2 coordinate)

- data\_node 1 contains 714 shards and heap memory is 10gb
- data\_node 2 contains 715 shards and heap memory is 10gb
- data\_node 3 contains 715 shards and heap memory is 10gb

is it sufficient to have 10gb heap memory ?

---

<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 1, 2021, 7:44am UTC](https://discuss.elastic.co/t/how-much-heap-memory-need-for-elasticsearch-data-nodes/262773/2 "2021-02-01T07:44:17Z")

</div>

The amount of heap a node needs depends on a lot of factors beyond the shard count, e.g. amount of data held, type of data and mappings, load and queries the cluster is subject to. I would recommend installing monitoring and look at this to see if you have enough heap.

---

<div class="post-metadata">

### Author: ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)
#### Post date: [February 1, 2021, 8:49am UTC](https://discuss.elastic.co/t/how-much-heap-memory-need-for-elasticsearch-data-nodes/262773/3 "2021-02-01T08:49:13Z")

</div>

Total shards we have 2142 and we have 3 data node each node have 714 shards heap size is 10gb of each node. it consuming 6.5gb heap out of 10gb  
Total Indices size is 638gb out of 1.2tb we know that a node with 30gb heap size can handle 600 shards but we have 10gb heap size how much it can handle

---

<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 1, 2021, 8:57am UTC](https://discuss.elastic.co/t/how-much-heap-memory-need-for-elasticsearch-data-nodes/262773/4 "2021-02-01T08:57:18Z")

</div>

> [@Aniket\_Pant](#):
>
> Total Indices size is 638gb out of 1.2tb we know that a node with 30gb heap size can handle 600 shards but we have 10gb heap size how much it can handle

If your total data size is 638GB, you have an average shard size of less than 300MB, which is **very** small and inefficient. The guideline on shard count relative heap size is a maximum aimed at reduce the risk for oversharding, which is one of the most common problems when dealing with time series data. The [general rule of thumb](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster) is that you should aim to have a **maximum** of 20 shards per GB of heap, which in your case would mean a **maximum** of 600 shards across the cluster. Note that the limit is not a recommended number of shards nor a level any cluster is guaranteed to be able to handle. In a properly configured cluster I would expect the shard count to be considerably smaller than the maximum as the recommended shard size is often between 10GB and 50GB when dealing with time series data.

---

<div class="post-metadata">

### Author: ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)
#### Post date: [February 1, 2021, 1:07pm UTC](https://discuss.elastic.co/t/how-much-heap-memory-need-for-elasticsearch-data-nodes/262773/5 "2021-02-01T13:07:40Z")

</div>

Thanks for this information

---

<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 1, 2021, 1:07pm UTC](https://discuss.elastic.co/t/how-much-heap-memory-need-for-elasticsearch-data-nodes/262773/6 "2021-03-01T13:07:49Z")

</div>

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