Hi all,
We have a encountered a slow down of our elasticsearch services, and profiling showed us that most time is spent on java.nio.channels.selector.SelectImpl.select(), which I think means es is waiting for next available thread. We also looked at hot threads and in many cases we get something like this:
79.5% (397.6ms out of 500ms) cpu usage by thread 'elasticsearch[ip-192-168-102-226-gloo][get][T#1]'
10/10 snapshots sharing following 10 elements
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
java.util.concurrent.LinkedTransferQueue.awaitMatch(LinkedTransferQueue.java:735)
java.util.concurrent.LinkedTransferQueue.xfer(LinkedTransferQueue.java:644)
java.util.concurrent.LinkedTransferQueue.take(LinkedTransferQueue.java:1137)
org.elasticsearch.common.util.concurrent.SizeBlockingQueue.take(SizeBlockingQueue.java:162)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:745)
What is the best way to try to optimize around something like this. We have a throughput of a few million queries a day but they are not uniformly distributed.
Thanks.