# Workers option logstash input

**URL:** <https://discuss.elastic.co/t/workers-option-logstash-input/43358>\
**Category:** Logstash\
**Created:** [March 3, 2016, 9:20am UTC](https://discuss.elastic.co/t/workers-option-logstash-input/43358 "2016-03-03T09:20:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Python\_Coder](https://avatars.discourse-cdn.com/v4/letter/p/aeb1de/32.png) [@Python\_Coder](https://discuss.elastic.co/u/Python_Coder)\
**Post date:** [March 3, 2016, 9:20am UTC](https://discuss.elastic.co/t/workers-option-logstash-input/43358/1 "2016-03-03T09:20:15Z")

</div>

Does the option "workers" works with redis input????

input {  
redis {  
host =\> "172.16.122.120"  
data\_type =\> "list"  
type =\> "redis-input"  
key =\> "logstash"  
workers =\> 8  
}  
}

---

<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 3, 2016, 9:22am UTC](https://discuss.elastic.co/t/workers-option-logstash-input/43358/2 "2016-03-03T09:22:10Z")

</div>

The docs say.......No!

[https://www.elastic.co/guide/en/logstash/current/plugins-inputs-redis.html](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-redis.html)

---

<div class="post-metadata">

**Author:** ![Python\_Coder](https://avatars.discourse-cdn.com/v4/letter/p/aeb1de/32.png) [@Python\_Coder](https://discuss.elastic.co/u/Python_Coder)\
**Post date:** [March 3, 2016, 10:10am UTC](https://discuss.elastic.co/t/workers-option-logstash-input/43358/3 "2016-03-03T10:10:15Z")

</div>

appreciate it man 🙂  
many thanks

---

<div class="post-metadata">

**Author:** ![bhatch](https://avatars.discourse-cdn.com/v4/letter/b/e95f7d/32.png) [@bhatch](https://discuss.elastic.co/u/bhatch)\
**Post date:** [March 4, 2016, 8:17pm UTC](https://discuss.elastic.co/t/workers-option-logstash-input/43358/4 "2016-03-04T20:17:36Z")

</div>

If you are wanting it to work faster, something you could try is to change the [batch\_count](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-redis.html#plugins-inputs-redis-batch_count). From what I understand, by default it pulls off one event at a time. Changing the batch count to 10 or 50 will increase how much it pulls at once. In our case it made it work significantly faster. I can't remember the specifics anymore, but I think it changed one logstash node to be able to handle around 3k eps instead of 2k eps. Try a few different values to see where you start getting diminishing returns.  
It only really helps when there are a lot of events stacked up on Redis though. If the Redis queue is less than your batch\_count you won't see much benefit.

---

<div class="post-metadata">

**Author:** ![Python\_Coder](https://avatars.discourse-cdn.com/v4/letter/p/aeb1de/32.png) [@Python\_Coder](https://discuss.elastic.co/u/Python_Coder)\
**Post date:** [March 5, 2016, 9:32am UTC](https://discuss.elastic.co/t/workers-option-logstash-input/43358/5 "2016-03-05T09:32:06Z")

</div>

Thanks man, seems very helpful, i'll give it a try

---

<div class="post-metadata">

**Author:** ![michalterbert](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@michalterbert](https://discuss.elastic.co/u/michalterbert)\
**Post date:** [March 5, 2016, 11:22pm UTC](https://discuss.elastic.co/t/workers-option-logstash-input/43358/6 "2016-03-05T23:22:03Z")

</div>

also you can try use more instances of logstash with the same config.

---

<div class="post-metadata">

**Author:** ![Bruno\_Lavoie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bruno_lavoie/32/8408_2.png) [@Bruno\_Lavoie](https://discuss.elastic.co/u/Bruno_Lavoie)\
**Post date:** [March 9, 2016, 8:21pm UTC](https://discuss.elastic.co/t/workers-option-logstash-input/43358/7 "2016-03-09T20:21:03Z")

</div>

with input redis, the option is named «threads».  
[https://www.elastic.co/guide/en/logstash/current/plugins-inputs-redis.html#plugins-inputs-redis-threads](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-redis.html#plugins-inputs-redis-threads)

---

<div class="post-metadata">

**Author:** ![Python\_Coder](https://avatars.discourse-cdn.com/v4/letter/p/aeb1de/32.png) [@Python\_Coder](https://discuss.elastic.co/u/Python_Coder)\
**Post date:** [March 10, 2016, 9:12am UTC](https://discuss.elastic.co/t/workers-option-logstash-input/43358/8 "2016-03-10T09:12:32Z")

</div>

added, thanks

---

<div class="post-metadata">

**Author:** ![Bruno\_Lavoie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bruno_lavoie/32/8408_2.png) [@Bruno\_Lavoie](https://discuss.elastic.co/u/Bruno_Lavoie)\
**Post date:** [March 10, 2016, 2:26pm UTC](https://discuss.elastic.co/t/workers-option-logstash-input/43358/9 "2016-03-10T14:26:46Z")

</div>

Also, I have written a question about tuning this redis parameter with the new NG-Pipeline as of 2.2.

> [@Input-redis parameters versus pipeline parameters](https://discuss.elastic.co/t/input-redis-parameters-versus-pipeline-parameters/43948):
>
> Hello, As of 2.2, pipeline architecture has changed. From the docs: Each input {} statement in the Logstash configuration file runs in its own thread. Inputs write events to a common Java SynchronousQueue. This queue holds no events, instead transferring each pushed event to a free worker, blocking if all workers are busy. Each pipeline worker thread takes a batch of events off this queue, creating a buffer per worker, runs the batch of events through the configured filters, then runs the fi…

It may be of interest to you.

Good luck  
Bruno Lavoie

---

<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:07am UTC](https://discuss.elastic.co/t/workers-option-logstash-input/43358/10 "2017-07-06T05:07:31Z")

</div>


