I have set up of 3 machines:
- Single ES process setup with 20gb heap size and 16 processors
- a logstash process with 20gb heap size connecting to the ES on machine 1
- filebeat pumping data to the logstash process on machine 2
Increasing the heap size on ES fron 2gb default to 20gb did not speed up the pipeline. Splitting the log file into multiple smaller parts to increase filebeat parallelism didn't help. Neither did increase the bulk_max_size to 8192. Any suggestions on how I can speed up the pipeline?
On the elasticsearch box, I got the following stats:
"cpu" : {
"percent" : 5,
"load_average" : {
"1m" : 2.93,
"5m" : 2.16,
"15m" : 2.04
}
}
"mem" : {
"free_percent" : 89,
"used_percent" : 11
}
"threads" : {
"count" : 308,
"peak_count" : 315
}
On the logstash box, the hottest thread was the following:
64.53 % of cpu usage, state: waiting, thread name: 'nioEventLoopGroup-4-1', thread id: 155
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
The same thread id remained the hottest throughout. It started from 11% and peaked to 65%.
The stats obtained are as follows:
"jvm" : {
"threads" : {
"count" : 136,
"peak_count" : 138
}
"process" : {
"open_file_descriptors" : 770,
"peak_open_file_descriptors" : 771,
"max_file_descriptors" : 4096,
"cpu" : {
"total_in_millis" : 9160760,
"percent" : 0,
"load_average" : {
"1m" : 0.18,
"5m" : 0.82,
"15m" : 1.12
}
}
}
The JVM memory heap usage[i.e. "heap_used_percent"] kept growing from 1-2% till 13%, which probably were the GC cycles.
As seen from stats, neither CPU nor RAM is being fully utilized. So, all available resources are under utilized, yet the pipeline is getting any faster. What am I missing?