# Is logstash input stage multithreaded?

**URL:** https://discuss.elastic.co/t/is-logstash-input-stage-multithreaded/75858
**Category:** Logstash
**Created:** [February 21, 2017, 10:27am UTC](https://discuss.elastic.co/t/is-logstash-input-stage-multithreaded/75858 "2017-02-21T10:27:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Zeeshan\_Alam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zeeshan_alam/32/94298_2.png) [@Zeeshan\_Alam](https://discuss.elastic.co/u/Zeeshan_Alam)
#### Post date: [February 21, 2017, 10:27am UTC](https://discuss.elastic.co/t/is-logstash-input-stage-multithreaded/75858/1 "2017-02-21T10:27:50Z")

</div>

I was looking at the logstash **pipeline.workers** option which states that

**-w, --pipeline.workers COUNT**

Sets the number of pipeline workers to run. This option sets the number of workers that will, **in parallel** , execute the **filter** and **output** stages of the pipeline. If you find that events are backing up, or that the CPU is not saturated, consider increasing this number to better utilize machine processing power. The default is the number of the host’s CPU cores.

I was wondering if logstash input stage also uses all the cores of my machine:

```
input {
  kafka {
    bootstrap_servers=>"kfk1:9092,kfk2:9092"
    topics => ["mytopic"]
    group_id => "mygroup"
    key_deserializer_class => "org.apache.kafka.common.serialization.ByteArrayDeserializer"
    value_deserializer_class => "org.apache.kafka.common.serialization.ByteArrayDeserializer"
    codec => avro {
      schema_uri => "/apps/schema/rocana3.schema"
    }
  }
}

```

Does this input \> kafka \> codec \> avro also utilizes all the cores of my machine or this a single threaded stage?

---

<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: [March 21, 2017, 10:27am UTC](https://discuss.elastic.co/t/is-logstash-input-stage-multithreaded/75858/2 "2017-03-21T10:27:56Z")

</div>

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