# What would be the best heap space setting for Logstash?

**URL:** <https://discuss.elastic.co/t/what-would-be-the-best-heap-space-setting-for-logstash/123332>\
**Category:** Logstash\
**Created:** [March 9, 2018, 7:40pm UTC](https://discuss.elastic.co/t/what-would-be-the-best-heap-space-setting-for-logstash/123332 "2018-03-09T19:40:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amruth](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@amruth](https://discuss.elastic.co/u/amruth)\
**Post date:** [March 9, 2018, 7:40pm UTC](https://discuss.elastic.co/t/what-would-be-the-best-heap-space-setting-for-logstash/123332/1 "2018-03-09T19:40:48Z")

</div>

Hi,

Can someone please suggest me the -Xms and -Xms heap space settings for Logstash should be?

Thanks

---

<div class="post-metadata">

**Author:** ![yaauie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yaauie/32/23363_2.png) [@yaauie](https://discuss.elastic.co/u/yaauie)\
**Post date:** [March 10, 2018, 1:24am UTC](https://discuss.elastic.co/t/what-would-be-the-best-heap-space-setting-for-logstash/123332/2 "2018-03-10T01:24:56Z")

</div>

@amruth unfortunately, the answer is "it depends", but we try to have sensible defaults for getting started; here are a few of the many things to consider:

- Are you experiencing pain with your current settings (e.g., is the heap underutilised, are you running out of memory, are you experiencing frequent GC pauses)?
- How big is each event (bytes, kilobytes, megabytes) ?
- What is the volume of events (e.g., tens per second, tens of thousands per second)?
- How much enrichment does your pipeline do to the events?

---

<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:** [April 7, 2018, 1:25am UTC](https://discuss.elastic.co/t/what-would-be-the-best-heap-space-setting-for-logstash/123332/3 "2018-04-07T01:25:12Z")

</div>

Closed on April 7, 2018, 1:25am UTC

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