# Logstash slow

**URL:** https://discuss.elastic.co/t/logstash-slow/228858
**Category:** Logstash
**Created:** [April 20, 2020, 12:02pm UTC](https://discuss.elastic.co/t/logstash-slow/228858 "2020-04-20T12:02:09Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![adwaitjoshi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adwaitjoshi/32/35098_2.png) [@adwaitjoshi](https://discuss.elastic.co/u/adwaitjoshi)
#### Post date: [April 20, 2020, 12:02pm UTC](https://discuss.elastic.co/t/logstash-slow/228858/1 "2020-04-20T12:02:09Z")

</div>

I am missing a setting or two on logstash I am sure but don't know which. My elastic cluster typically indexes at about 12000 docs/sec. I have Logstash pulling from kafka and sensing to Elastic. Seeing speeds of 250/sec.

I have 8 partitions in Kafka  
My pipeline.workers: 8  
My pipeline.batch.size: 5000

jvm has 16GB of Ram. I am using SSDs, there is no way its this slow. Something is happening.

What am I missing? Thanks in advance!

---

<div class="post-metadata">

### Author: ![adwaitjoshi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adwaitjoshi/32/35098_2.png) [@adwaitjoshi](https://discuss.elastic.co/u/adwaitjoshi)
#### Post date: [April 20, 2020, 6:15pm UTC](https://discuss.elastic.co/t/logstash-slow/228858/2 "2020-04-20T18:15:08Z")

</div>

If I run logstash as a service its very slow. If I run the same config from command like its fast. Here is a graph that shows the difference. Can someone tell me why?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/8/d8d08f1052ee307091f34882b0e509f34baf26c3.png)

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [April 20, 2020, 8:37pm UTC](https://discuss.elastic.co/t/logstash-slow/228858/3 "2020-04-20T20:37:13Z")

</div>

Does your OS run services at a lower priority than interactive shells? If so, it may be seeing CPU contention.

---

<div class="post-metadata">

### Author: ![adwaitjoshi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adwaitjoshi/32/35098_2.png) [@adwaitjoshi](https://discuss.elastic.co/u/adwaitjoshi)
#### Post date: [April 20, 2020, 8:38pm UTC](https://discuss.elastic.co/t/logstash-slow/228858/4 "2020-04-20T20:38:00Z")

</div>

It should not. How do I check this? I am running Centos 7.5 with default configs. Infact BARELY any CPU was used when its running as service and plenty CPU is available.

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [April 20, 2020, 8:45pm UTC](https://discuss.elastic.co/t/logstash-slow/228858/5 "2020-04-20T20:45:03Z")

</div>

I would read the man pages for which service manager you use.

---

<div class="post-metadata">

### Author: ![adwaitjoshi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adwaitjoshi/32/35098_2.png) [@adwaitjoshi](https://discuss.elastic.co/u/adwaitjoshi)
#### Post date: [April 20, 2020, 9:04pm UTC](https://discuss.elastic.co/t/logstash-slow/228858/6 "2020-04-20T21:04:40Z")

</div>

> [@Badger](#):
>
> I would read the man pages for which service manager you use.

Its not running at a lower priority, when I run top it shows the java process running just fine, I just dont see a high enough CPU usage which means it could be defaulting to some other config? I dont know.

---

<div class="post-metadata">

### Author: ![adwaitjoshi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adwaitjoshi/32/35098_2.png) [@adwaitjoshi](https://discuss.elastic.co/u/adwaitjoshi)
#### Post date: [April 22, 2020, 6:37pm UTC](https://discuss.elastic.co/t/logstash-slow/228858/7 "2020-04-22T18:37:59Z")

</div>

Anyone?

---

<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: [May 20, 2020, 6:38pm UTC](https://discuss.elastic.co/t/logstash-slow/228858/8 "2020-05-20T18:38:00Z")

</div>

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