# Logstash FlushSize correlation to Heap Size

**URL:** <https://discuss.elastic.co/t/logstash-flushsize-correlation-to-heap-size/34729>\
**Category:** Logstash\
**Created:** [November 16, 2015, 8:30pm UTC](https://discuss.elastic.co/t/logstash-flushsize-correlation-to-heap-size/34729 "2015-11-16T20:30:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahulnadella](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahulnadella/32/22117_2.png) [@rahulnadella](https://discuss.elastic.co/u/rahulnadella)\
**Post date:** [November 16, 2015, 8:30pm UTC](https://discuss.elastic.co/t/logstash-flushsize-correlation-to-heap-size/34729/1 "2015-11-16T20:30:17Z")

</div>

I trying to figure out if there is a way to calculate (via specific formula) the corresponding Logstash Heap Size should be based on the set Flush\_Size. Currently we are trying to set the flush\_size to 5000 and the heap\_size is set to 2GB. Also are they any additional settings that need to be set in ElasticSearch (for instance index refresh interval 15s and the heap size to 20GB for one instance).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 17, 2015, 8:39pm UTC](https://discuss.elastic.co/t/logstash-flushsize-correlation-to-heap-size/34729/2 "2015-11-17T20:39:33Z")

</div>

LS doesn't need much heap unless you have large buffers like your flush\_size there.

I'd really look at reducing that to something around the 2K mark myself.

---

<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:** [July 6, 2017, 5:22am UTC](https://discuss.elastic.co/t/logstash-flushsize-correlation-to-heap-size/34729/3 "2017-07-06T05:22:29Z")

</div>


