# ES HEAP size allocation

**URL:** <https://discuss.elastic.co/t/es-heap-size-allocation/106962>\
**Category:** Elasticsearch\
**Created:** [November 9, 2017, 4:37am UTC](https://discuss.elastic.co/t/es-heap-size-allocation/106962 "2017-11-09T04:37:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![493607120](https://avatars.discourse-cdn.com/v4/letter/4/b9e5f3/32.png) [@493607120](https://discuss.elastic.co/u/493607120)\
**Post date:** [November 9, 2017, 4:37am UTC](https://discuss.elastic.co/t/es-heap-size-allocation/106962/1 "2017-11-09T04:37:43Z")

</div>

Hi folks,

Recently I installed an ES monitoring plugin **Cerebro** on an ES client node.

After looked at the overview of the whole cluster health status. I found there is half ES data node's heap size show in red flag.we have **20 ES data nodes** in a cluster. a half of them have 64GB memory, I assigned **30GB to heap size** , and the other half of them have 48GB memory, I assigned **16GB to heap size** , the problem appeared on the heap size with 16GB, they're used more than **80%** of the heap size.

what's the best suggestion to assign the heap size to all of those servers with **48GB** mem?

To assign heap size **24GB** or **30GB** to the servers with **48GB** mem?

Thanks in advance

---

<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:** [November 9, 2017, 6:30am UTC](https://discuss.elastic.co/t/es-heap-size-allocation/106962/2 "2017-11-09T06:30:04Z")

</div>

No more than 24gb then.

But the question is may be to understand why you need so much heap first?

---

<div class="post-metadata">

**Author:** ![493607120](https://avatars.discourse-cdn.com/v4/letter/4/b9e5f3/32.png) [@493607120](https://discuss.elastic.co/u/493607120)\
**Post date:** [November 9, 2017, 7:10am UTC](https://discuss.elastic.co/t/es-heap-size-allocation/106962/3 "2017-11-09T07:10:23Z")

</div>

> [@dadoonet](#):
>
> o more than 24gb then.
> 
> But the question is may be to understand why you need so much heap first?

hi @dadoonet,

Cuz I just follow ES official web doc, as there is detail explanation of how to set heap size in term of total mem that server have.normally set an half size of total mem for heap size. but never over 32GB even if there is bigger mem within a server.

We're using ES cluster for collect all kind of monitoring metrics via metricbeat or customize beats. and our company needs to keep 1 years online metrics.

By the way, I take one of our ES example of our prod config file, would you please have a look and see if it fesible?

a phsical server specs

**CPU:32 MEM:64GB**

```
# ---------------------------------- Indexing-----------------------------------

#The field data cache is used mainly when sorting on or computing aggregations on a field.
indices.fielddata.cache.size: 75%

#The field data circuit breaker allows Elasticsearch to estimate the amount of memory a field will require to be loaded into memory
indices.breaker.fielddata.limit: 85%

#caching the results of queries take percentage of total heap size
indices.queries.cache.size: 60%

#memory index take percentage of total heap size
indices.memory.index_buffer_size: 20%

#min memory index
indices.memory.min_index_buffer_size: 3000m

#max memory index
indices.memory.max_index_buffer_size: 6000m

#query cache
indices.requests.cache.size: 30%

# ---------------------------------- Pool-----------------------------------
#<int((cpu_core_nums*3)/2)+1>
thread_pool.search.size: 49

#fixed number: 1000
thread_pool.search.queue_size: 1000

#cpu_core_numbs
thread_pool.bulk.size: 32

#fixed number: 200
thread_pool.bulk.queue_size: 200

#cpu_core_numbs
thread_pool.index.size: 32

#fixed number: 200
thread_pool.index.queue_size: 200

```

---

<div class="post-metadata">

**Author:** ![493607120](https://avatars.discourse-cdn.com/v4/letter/4/b9e5f3/32.png) [@493607120](https://discuss.elastic.co/u/493607120)\
**Post date:** [November 9, 2017, 7:13am UTC](https://discuss.elastic.co/t/es-heap-size-allocation/106962/4 "2017-11-09T07:13:00Z")

</div>

please feel free to comments here if anyone has a good suggestion.

Regards

---

<div class="post-metadata">

**Author:** ![493607120](https://avatars.discourse-cdn.com/v4/letter/4/b9e5f3/32.png) [@493607120](https://discuss.elastic.co/u/493607120)\
**Post date:** [November 9, 2017, 7:15am UTC](https://discuss.elastic.co/t/es-heap-size-allocation/106962/5 "2017-11-09T07:15:33Z")

</div>

> [@dadoonet](#):
>
> No more than 24gb then.
> 
> But the question is may be to understand why you need so much heap first?

```
No more than 24gb then.
==>how about 23GB for heap size for the server with 48GB mem.

```

---

<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:** [December 7, 2017, 7:26am UTC](https://discuss.elastic.co/t/es-heap-size-allocation/106962/6 "2017-12-07T07:26:03Z")

</div>

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