Why is my Logstash startup so slow?

(Devin) #1

I'm running Logstash 6.6.1 in a Docker container in a cloud computing environment (Heroku). There's a limit on app boot time on Heroku, which is problematic for me because Logstash sometimes takes up to 2 minutes to start.

I think I have a pretty simple setup:

  1. Input via tcp
  2. Extract a JSON component from each log entry
  3. Output to Elasticsearch and S3

Here's my config and a log of the startup process:

It's not one thing that seems to be taking a long time. That log is from the container running on Heroku, but it takes about as long when I run it locally. Is this kind of startup performance expected for Logstash or is there something wrong with my setup?

(Ken Harvey) #2

Nope, that's about right.

My assumption is that most of the time is spent spinning up the JVM. Once the JVM is up and running, the rest of the logstash startup is pretty quick (maybe another 5 to 10 seconds).

I have this same problem on all of my VM's, physical servers, and cloud servers. This happens on fresh installs as well.

(Devin) #3

That's disheartening. Do you think running inside Docker makes things much slower? I do have the option to just compile and run natively.

(Ken Harvey) #4

I just tested on my servers and it took 1:41 to startup.
I have a pretty complex pipeline setup on mine, I am running around a dozen pipelines right now over multiple ports.

Honestly, I have not tried logstash in Docker yet. My environment does not warrant that kind of separation...yet.

(system) closed #5

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