# Kafka input painfully slow

**URL:** https://discuss.elastic.co/t/kafka-input-painfully-slow/77013
**Category:** Logstash
**Created:** [March 1, 2017, 3:39pm UTC](https://discuss.elastic.co/t/kafka-input-painfully-slow/77013 "2017-03-01T15:39:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ArunANayagam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arunanayagam/32/45171_2.png) [@ArunANayagam](https://discuss.elastic.co/u/ArunANayagam)
#### Post date: [March 1, 2017, 3:39pm UTC](https://discuss.elastic.co/t/kafka-input-painfully-slow/77013/1 "2017-03-01T15:39:26Z")

</div>

Hi,

I was using logstash-input-jms, to read messages transform them (xml parsing) and putting them into elasticsearch.  
It worked quite well although under marginally higher load (42k messages per minute) it would slowdown a bit and I would just increase the number of logstash instances and it would be fine.

I thought moving to Kafka-input would be better. The "filter" and the "output" sections are exactly the same as the one used for logstash-input-jms.

Kafka version -- kafka\_2.11-0.10.2.0 (and associated zookeeper)  
1 partition, I haven't changed anything at all, just the vanilla version.  
Logstash -- 2.4.0  
Elasticsearch -- 2.4.0

Here's the input,

```
input {
        kafka {
                zk_connect => "zoo003:9620"
                topic_id => "Push.ElasticSearch.1"
                consumer_id => "elastic"
                group_id => "elastic"
                auto_offset_reset => "largest"
        }
}

```

Adding more instances of logstash doesn't help, in fact when I do a "top", 1st instance CPU is about 275% (32 cores) and the 2nd instance is 0-1%, so I know its doing nothing.

Its just not able to keep up with the messages coming in, at a rate of around 40K per minute. Which I think is not a lot.

Am I missing something? Can you please help.

Thanks,  
Arun

---

<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 29, 2017, 3:39pm UTC](https://discuss.elastic.co/t/kafka-input-painfully-slow/77013/2 "2017-03-29T15:39:36Z")

</div>

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