# Ideal heap size for large RAM machine

**URL:** https://discuss.elastic.co/t/ideal-heap-size-for-large-ram-machine/111915
**Category:** Elasticsearch
**Created:** [December 15, 2017, 7:28am UTC](https://discuss.elastic.co/t/ideal-heap-size-for-large-ram-machine/111915 "2017-12-15T07:28:29Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![vivek7mehta](https://avatars.discourse-cdn.com/v4/letter/v/51bf81/32.png) [@vivek7mehta](https://discuss.elastic.co/u/vivek7mehta)
#### Post date: [December 15, 2017, 7:28am UTC](https://discuss.elastic.co/t/ideal-heap-size-for-large-ram-machine/111915/1 "2017-12-15T07:28:29Z")

</div>

As suggested here:  
[https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html)

I should give leas than half of my memory to Lucene. It also suggests that I says that I should not assign more than 32GB to elasticsearch JVM heap size.

My query is that I have machine with larger memory (200-300 GB). Is there any way I could use my spare memory to improve elasticsearch performance.

---

<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, 2017, 7:37am UTC](https://discuss.elastic.co/t/ideal-heap-size-for-large-ram-machine/111915/2 "2017-12-15T07:37:13Z")

</div>

If heap pressure and GC is having an impact on your performance, deploying more than one node with a heap just under 32GB on such a host can help. If your performance bottleneck on the other hand is e.g. disk I/O, that may however not necessarily help a lot.

Have you determined what is limiting performance in your setup?

---

<div class="post-metadata">

### Author: ![vivek7mehta](https://avatars.discourse-cdn.com/v4/letter/v/51bf81/32.png) [@vivek7mehta](https://discuss.elastic.co/u/vivek7mehta)
#### Post date: [December 15, 2017, 7:43am UTC](https://discuss.elastic.co/t/ideal-heap-size-for-large-ram-machine/111915/3 "2017-12-15T07:43:59Z")

</div>

I am not sure exactly what is causing the issue, but Elasticsearch node is taking more time during startup (after startup it works normally). So I was wondering if increasing initial/maximum JVM heap size will have impact on that.

---

<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, 2017, 7:45am UTC](https://discuss.elastic.co/t/ideal-heap-size-for-large-ram-machine/111915/4 "2017-12-15T07:45:19Z")

</div>

Can you provide the full output of the [cluster stats API](https://www.elastic.co/guide/en/elasticsearch/reference/6.1/cluster-stats.html)?

---

<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, 2018, 7:45am UTC](https://discuss.elastic.co/t/ideal-heap-size-for-large-ram-machine/111915/5 "2018-01-12T07:45:27Z")

</div>

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