# Logstash node memory settings

**URL:** <https://discuss.elastic.co/t/logstash-node-memory-settings/92475>\
**Category:** Logstash\
**Created:** [July 10, 2017, 1:23pm UTC](https://discuss.elastic.co/t/logstash-node-memory-settings/92475 "2017-07-10T13:23:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mruthyu](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@mruthyu](https://discuss.elastic.co/u/mruthyu)\
**Post date:** [July 10, 2017, 1:23pm UTC](https://discuss.elastic.co/t/logstash-node-memory-settings/92475/1 "2017-07-10T13:23:26Z")

</div>

Logstash node has 16GB RAM and max and min heap size has been set to 8GB.

Seeing the following error when testing the logstash pipeline. What is the recommended setting to avoid this issue?  
Less than 8GB for min and max heap?

OpenJDK 64-Bit Server VM warning: INFO: os::commit\_memory(0x00000005d4cc0000, 8241020928, 0) failed; error='Cannot allocate memory' (errno=12)

# 

# There is insufficient memory for the Java Runtime Environment to continue.

# Native memory allocation (mmap) failed to map 8241020928 bytes for committing reserved memory.

# An error report file with more information is saved as:

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 12, 2017, 12:32pm UTC](https://discuss.elastic.co/t/logstash-node-memory-settings/92475/2 "2017-07-12T12:32:02Z")

</div>

Why are you attempting to set the heap size to 8 GB? The default heap size is quite sufficient in the vast majority of cases.

---

<div class="post-metadata">

**Author:** ![mruthyu](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@mruthyu](https://discuss.elastic.co/u/mruthyu)\
**Post date:** [July 12, 2017, 12:56pm UTC](https://discuss.elastic.co/t/logstash-node-memory-settings/92475/3 "2017-07-12T12:56:58Z")

</div>

Sure. Thanks. What is the default heap size? Not sure if the default heap size setting is sufficient which is less than 8GB why the above mentioned error is showing up. This is dedicated logstash node. After restarting the logstash it is fine now. Not sure what has caused this issue.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 12, 2017, 1:43pm UTC](https://discuss.elastic.co/t/logstash-node-memory-settings/92475/4 "2017-07-12T13:43:41Z")

</div>

> What is the default heap size?

1 or 2 GB, I think.

> Not sure if the default heap size setting is sufficient which is less than 8GB why the above mentioned error is showing up.

The error message doesn't mean "Logstash has run out of heap, increase the heap" it means "Logstash can't allocate memory for your heap, descrease the heap (or fix whatever is limiting the allocation)".

> This is dedicated logstash node.

It's very unlikely that you'll need anything close to 16 GB RAM just to run Logstash.

---

<div class="post-metadata">

**Author:** ![mruthyu](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@mruthyu](https://discuss.elastic.co/u/mruthyu)\
**Post date:** [July 12, 2017, 5:41pm UTC](https://discuss.elastic.co/t/logstash-node-memory-settings/92475/5 "2017-07-12T17:41:50Z")

</div>

Sure. Thanks. Will keep the default heap settings and check.

---

<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:** [August 9, 2017, 5:41pm UTC](https://discuss.elastic.co/t/logstash-node-memory-settings/92475/6 "2017-08-09T17:41:55Z")

</div>

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