Skip to content

Instantly share code, notes, and snippets.

@colinsurprenant
Last active April 22, 2021 01:27
Show Gist options
  • Save colinsurprenant/50ba340cac2367710e21 to your computer and use it in GitHub Desktop.
Save colinsurprenant/50ba340cac2367710e21 to your computer and use it in GitHub Desktop.
measuring logstash filters performance

Measuring logstash filters performance

  • given a data file sample named data.log
  • modify your config to use the stdin input so that you can pipe you sample log file to logstash
input {
  stdin {
    codec => line
  }
}
  • modify your config to use the stdout output with the dots codec
output {
  stdout {
    codec => dots
  }
}
  • continously send your sample data to logtash and check pv numbers
$ while true; do cat t.t; done | bin/logstash -f myconfig.conf | pv -Wbart  > /dev/null
10.6KiB 0:01:15 [ 631 B/s] [ 732 B/s]

Here [ 631 B/s] is the current throughput in events per second and [ 732 B/s] is the average throughput for the test duration

It is important to let logstash run for a while, to factor out the statup time and the JVM warmup. Typically the average throughput settles after 30 secs to 1 minute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment