# Logstash memory requirements

**URL:** <https://discuss.elastic.co/t/logstash-memory-requirements/94735>\
**Category:** Logstash\
**Created:** [July 27, 2017, 4:27am UTC](https://discuss.elastic.co/t/logstash-memory-requirements/94735 "2017-07-27T04:27:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![soumya1](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@soumya1](https://discuss.elastic.co/u/soumya1)\
**Post date:** [July 27, 2017, 4:27am UTC](https://discuss.elastic.co/t/logstash-memory-requirements/94735/1 "2017-07-27T04:27:18Z")

</div>

Hi

i am configuring logstash so as to send data from 3 kafka clusters which generates 1lac events per second per each cluster.  
can you tell me the java heap memory allocation and pipeline workers and batch size which i should configure.  
also let me know how to minimize cpu usage

thanks  
soumya

---

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [August 2, 2017, 3:23pm UTC](https://discuss.elastic.co/t/logstash-memory-requirements/94735/2 "2017-08-02T15:23:35Z")

</div>

You should leave the workers and batch size as the defaults.  
Java memory is a different story because it depends on the size of the strings in each event.  
`workers X events per batch X max event size X 3`  
The `X 3` is because in many cases the strings are duplicated or the event is JSON serialised - so there are multiple copies of various pieces of data in flight.

---

<div class="post-metadata">

**Author:** ![soumya1](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@soumya1](https://discuss.elastic.co/u/soumya1)\
**Post date:** [August 3, 2017, 9:03am UTC](https://discuss.elastic.co/t/logstash-memory-requirements/94735/3 "2017-08-03T09:03:08Z")

</div>

Thanks for the answer guyboertje  
Actually i am pushing data from logstash output plugin solr to SOLR cloud collection (here am taking sample cloud collection)  
the data was continously passing to solr but suddenly the data passing stopped.  
can you tell me why .is it a memory issue.i see no error logs

---

<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 31, 2017, 9:03am UTC](https://discuss.elastic.co/t/logstash-memory-requirements/94735/4 "2017-08-31T09:03:32Z")

</div>

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