As I understand, each input section would be run with separate thread.
But if I use wild cards in an input section, does this create multiple threads or still a single thread would be created?
I ask this because, if a wildcard results in huge number of files, then how Logstash would handle this?
I believe it's a single thread per file input. I haven't looked at the code, but it's my experience that each file will be read until EOF before Logstash continues with the next file.
@magnusbaeck
Okay. So, the same thread would read all the files matching the wildcard one after the another.
But my concern is we have many log files in multiple folders. But all log files are similar. So, filtering is same.
So, I am trying to load balance between multiple threads rather one thread take all the load.
Keep in mind that your performance is (also) bound by the filter and output throughput so increasing parallelism on the input side won't necessarily help. Bulk-reading messages from a big file is probably quite fast.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.