Hi,
I am using ELK GA 5.0.0 in my Linux box. I am using 2 logstash instances to pull from Kafka, and it is having high CPU utilization. I tried /_node/hot_threads?human=true
and below are the results;
node 1
::: {}
Hot threads at 2017-05-15T06:25:27+00:00, busiestThreads=3:
================================================================================
83.03 % of cpu usage, state: runnable, thread name: 'Ruby-0-Thread-13'
/apps/ELK/Logstash/vendor/bundle/jruby/1.9/gems/logstash-input-kafka-5.0.5/lib/logstash/inputs/kafka.rb:191
java.lang.System.identityHashCode(Native Method)
org.jruby.javasupport.util.ObjectProxyCache.hash(ObjectProxyCache.java:174)
org.jruby.javasupport.util.ObjectProxyCache.getOrCreate(ObjectProxyCache.java:163)
org.jruby.javasupport.Java.getInstance(Java.java:385)
org.jruby.javasupport.Java.getInstance(Java.java:364)
org.jruby.javasupport.JavaUtil.convertJavaToUsableRubyObject(JavaUtil.java:194)
org.jruby.javasupport.JavaMethod.convertReturn(JavaMethod.java:513)
org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:437)
org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:300)
org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:35)
--------------------------------------------------------------------------------
82.94 % of cpu usage, state: runnable, thread name: 'Ruby-0-Thread-11'
/apps/ELK/Logstash/vendor/bundle/jruby/1.9/gems/logstash-input-kafka-5.0.5/lib/logstash/inputs/kafka.rb:191
sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93)
sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
sun.nio.ch.SelectorImpl.selectNow(SelectorImpl.java:105)
org.apache.kafka.common.network.Selector.select(Selector.java:452)
org.apache.kafka.common.network.Selector.poll(Selector.java:277)
org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:260)
org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.clientPoll(ConsumerNetworkClient.java:360)
org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:224)
--------------------------------------------------------------------------------
82.87 % of cpu usage, state: runnable, thread name: 'Ruby-0-Thread-12'
/apps/ELK/Logstash/vendor/bundle/jruby/1.9/gems/logstash-input-kafka-5.0.5/lib/logstash/inputs/kafka.rb:191
sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93)
sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
sun.nio.ch.SelectorImpl.selectNow(SelectorImpl.java:105)
org.apache.kafka.common.network.Selector.select(Selector.java:452)
org.apache.kafka.common.network.Selector.poll(Selector.java:277)
org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:260)
org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.clientPoll(ConsumerNetworkClient.java:360)
org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:224)
--------------------------------------------------------------------------------
node 2
::: {}
Hot threads at 2017-05-15T06:24:45+00:00, busiestThreads=3:
================================================================================
94.48 % of cpu usage, state: runnable, thread name: 'Ruby-0-Thread-8'
/apps/ELK/Logstash/vendor/bundle/jruby/1.9/gems/logstash-input-kafka-5.0.5/lib/logstash/inputs/kafka.rb:191
sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93)
sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
sun.nio.ch.SelectorImpl.selectNow(SelectorImpl.java:105)
org.apache.kafka.common.network.Selector.select(Selector.java:452)
org.apache.kafka.common.network.Selector.poll(Selector.java:277)
org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:260)
org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.clientPoll(ConsumerNetworkClient.java:360)
org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:224)
--------------------------------------------------------------------------------
0.5 % of cpu usage, state: waiting, thread name: '[main]>worker3'
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireInterruptibly(AbstractQueuedSynchronizer.java:897)
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1222)
java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:335)
org.jruby.RubyThread.lockInterruptibly(RubyThread.java:1470)
org.jruby.ext.thread.Mutex.lock(Mutex.java:91)
org.jruby.ext.thread.Mutex.synchronize(Mutex.java:147)
org.jruby.ext.thread.Mutex$INVOKER$i$0$0$synchronize.call(Mutex$INVOKER$i$0$0$synchronize.gen)
--------------------------------------------------------------------------------
0.5 % of cpu usage, state: waiting, thread name: '[main]>worker4'
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireInterruptibly(AbstractQueuedSynchronizer.java:897)
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1222)
java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:335)
org.jruby.RubyThread.lockInterruptibly(RubyThread.java:1470)
org.jruby.ext.thread.Mutex.lock(Mutex.java:91)
org.jruby.ext.thread.Mutex.synchronize(Mutex.java:147)
org.jruby.ext.thread.Mutex$INVOKER$i$0$0$synchronize.call(Mutex$INVOKER$i$0$0$synchronize.gen)
--------------------------------------------------------------------------------
Somebody kindly tell me why is this happening and how to fix this? Thanks in advance.