Hi guyboertje,
thanks for your reply!
I keep the flush size double the size of the pipeline batch size, because in production I may add a filter which will increase the event number on a pipeline thread. Does it make sense?
For what concern -w and elasticsearch output workers you seem to suggest to assign them the same value. I will perform some test, but could you explain why? I have experimented they change different things and should not be related to each other:
- -w controls the thread number of the pipeline filter/output blocks.
- elasticsearch output workers controls the number of tcp sockets the output plugin opens for each defined ES host. Since I have 6 ES data nodes every unit increase results in 6 more sockets open.
A first batch of tests follows, as soon as possible I will publish the ones you asked with 6, 12, 18 and 24 elasticsearch output workers.
For all tests the following is kept fixed
-b 8000
elasticsearch output hosts: 6
Test #1
-w 1
ES output workers => 6
{:timestamp=>"2016-06-01T10:21:04.369000+0200", :message=>"Starting pipeline", :id=>"main", :pipeline_workers=>1, :batch_size=>8000, :batch_delay=>5, :max_inflight=>8000, :level=>:info}
Logstash open sockets: 36
Logstash events per second: 4800
Note: the open sockets can be derived with the following command
# netstat -anp | grep 9200 | grep java | grep ESTABLISHED | wc -l 36
and depends by the number of ES hosts defined in the elasticsearch ouput plugin multiplier per the number of ES output workers.
Test #2
-w 2
ES output workers => 6
{:timestamp=>"2016-06-01T10:38:11.138000+0200", :message=>"Starting pipeline", :id=>"main", :pipeline_workers=>2, :batch_size=>8000, :batch_delay=>5, :max_inflight=>16000, :level=>:info}
Logstash open sockets: 36
Logstash events per second: 6650
Test #3
-w 3
ES output workers => 6
{:timestamp=>"2016-06-01T10:51:11.809000+0200", :message=>"Starting pipeline", :id=>"main", :pipeline_workers=>3, :batch_size=>8000, :batch_delay=>5, :max_inflight=>24000, :level=>:info}
Logstash open sockets: 36
Logstash events per second: 9650
Test #4
-w 4
ES output workers => 6
{:timestamp=>"2016-06-01T11:15:26.855000+0200", :message=>"Starting pipeline", :id=>"main", :pipeline_workers=>4, :batch_size=>8000, :batch_delay=>5, :max_inflight=>32000, :level=>:info}
Logstash open sockets: 36
Logstash events per second: 12000
Test #5
-w 5
ES output workers => 6
{:timestamp=>"2016-06-01T11:38:18.161000+0200", :message=>"Starting pipeline", :id=>"main", :pipeline_workers=>5, :batch_size=>8000, :batch_delay=>5, :max_inflight=>40000, :level=>:info}
Logstash open sockets: 36
Logstash events per second: 14000
Test #6
-w 6
ES output workers => 6
{:timestamp=>"2016-06-01T12:06:57.072000+0200", :message=>"Starting pipeline", :id=>"main", :pipeline_workers=>6, :batch_size=>8000, :batch_delay=>5, :max_inflight=>48000, :level=>:info}
Logstash open sockets: 36
Logstash events per second: 15300
Test #7
-w 7
ES output workers => 6
{:timestamp=>"2016-06-01T12:36:01.113000+0200", :message=>"Starting pipeline", :id=>"main", :pipeline_workers=>7, :batch_size=>8000, :batch_delay=>5, :max_inflight=>56000, :level=>:info}
Logstash open sockets: 36
Logstash events per second: 16100
Test #8
-w 8
ES output workers => 6
{:timestamp=>"2016-06-01T12:58:53.128000+0200", :message=>"Starting pipeline", :id=>"main", :pipeline_workers=>8, :batch_size=>8000, :batch_delay=>5, :max_inflight=>64000, :level=>:info}
Logstash open sockets: 36
Logstash events per second: 16800