# Number of workers vs Memory consumption

**URL:** <https://discuss.elastic.co/t/number-of-workers-vs-memory-consumption/45681>\
**Category:** Logstash\
**Created:** [March 29, 2016, 12:36pm UTC](https://discuss.elastic.co/t/number-of-workers-vs-memory-consumption/45681 "2016-03-29T12:36:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![billy6](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@billy6](https://discuss.elastic.co/u/billy6)\
**Post date:** [March 29, 2016, 12:36pm UTC](https://discuss.elastic.co/t/number-of-workers-vs-memory-consumption/45681/1 "2016-03-29T12:36:01Z")

</div>

Hello, I would like to know if there is a direct dependency between the number of workers I'm using in logstash and the memory consumption.  
I have changed from 1 worker to 50 workers with a little change in memory consumption.  
I'm using `top | grep java` to see the memory consumption of the PID

I have noticed there is an increase in CPU usage, which makes sense, but what about memory?

Thank you very much

---

<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:** [March 29, 2016, 8:55pm UTC](https://discuss.elastic.co/t/number-of-workers-vs-memory-consumption/45681/2 "2016-03-29T20:55:53Z")

</div>

That'll depend on what inputs, filters and outputs you use.

---

<div class="post-metadata">

**Author:** ![billy6](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@billy6](https://discuss.elastic.co/u/billy6)\
**Post date:** [March 30, 2016, 7:44am UTC](https://discuss.elastic.co/t/number-of-workers-vs-memory-consumption/45681/3 "2016-03-30T07:44:04Z")

</div>

In my case I'm using 2 inputs (udp and gelf), for the filters I'm using grok and grep and for the output I have elasticsearch and redis.

---

<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:04am UTC](https://discuss.elastic.co/t/number-of-workers-vs-memory-consumption/45681/4 "2017-07-06T05:04:48Z")

</div>


