Hi,
I have been testing elasticsearch and have found it to slowly start using 100% of cpu even when there are no queries taking place. There's only few documents getting bulk indexed after every 10 seconds. But elasticsearch search is still using a lot of cpu in those idle 10 seconds.
I am using elasticsearch 0.90.2, mlockall at 1gb, fielddata cache set to soft. I don't think gc is the issue as there was no log warnings of slow gc calls.
It seems to be taking time in 1) org.elasticsearch.indices.cache.filter.IndicesFilterCache$ReaderCleaner
and 2) java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill
Hot Threads full dump
100.3% (501.4ms out of 500ms) cpu usage by thread 'elasticsearch[Braddock, Meggan][generic][T#192]'
2/10 snapshots sharing following 10 elements
org.elasticsearch.common.cache.LocalCache.getLiveValue(LocalCache.java:1950)
org.elasticsearch.common.cache.LocalCache$HashIterator.advanceTo(LocalCache.java:4389)
org.elasticsearch.common.cache.LocalCache$HashIterator.nextInTable(LocalCache.java:4373)
org.elasticsearch.common.cache.LocalCache$HashIterator.advance(LocalCache.java:4337)
org.elasticsearch.common.cache.LocalCache$HashIterator.nextEntry(LocalCache.java:4412)
org.elasticsearch.common.cache.LocalCache$KeyIterator.next(LocalCache.java:4428)
org.elasticsearch.indices.cache.filter.IndicesFilterCache$ReaderCleaner$1.run(IndicesFilterCache.java:184)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:722)
2/10 snapshots sharing following 5 elements
org.elasticsearch.common.trove.impl.hash.TObjectHash.contains(TObjectHash.java:153)
org.elasticsearch.indices.cache.filter.IndicesFilterCache$ReaderCleaner$1.run(IndicesFilterCache.java:185)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:722)
2/10 snapshots sharing following 8 elements
org.elasticsearch.common.cache.LocalCache$HashIterator.nextInTable(LocalCache.java:4372)
org.elasticsearch.common.cache.LocalCache$HashIterator.advance(LocalCache.java:4337)
org.elasticsearch.common.cache.LocalCache$HashIterator.nextEntry(LocalCache.java:4412)
org.elasticsearch.common.cache.LocalCache$KeyIterator.next(LocalCache.java:4428)
org.elasticsearch.indices.cache.filter.IndicesFilterCache$ReaderCleaner$1.run(IndicesFilterCache.java:184)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:722)
3/10 snapshots sharing following 7 elements
org.elasticsearch.common.cache.LocalCache$HashIterator.advance(LocalCache.java:4333)
org.elasticsearch.common.cache.LocalCache$HashIterator.nextEntry(LocalCache.java:4412)
org.elasticsearch.common.cache.LocalCache$KeyIterator.next(LocalCache.java:4428)
org.elasticsearch.indices.cache.filter.IndicesFilterCache$ReaderCleaner$1.run(IndicesFilterCache.java:184)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:722)
unique snapshot
org.elasticsearch.common.cache.LocalCache.getLiveValue(LocalCache.java:1947)
org.elasticsearch.common.cache.LocalCache$HashIterator.advanceTo(LocalCache.java:4389)
org.elasticsearch.common.cache.LocalCache$HashIterator.nextInTable(LocalCache.java:4373)
org.elasticsearch.common.cache.LocalCache$HashIterator.advance(LocalCache.java:4337)
org.elasticsearch.common.cache.LocalCache$HashIterator.nextEntry(LocalCache.java:4412)
org.elasticsearch.common.cache.LocalCache$KeyIterator.next(LocalCache.java:4428)
org.elasticsearch.indices.cache.filter.IndicesFilterCache$ReaderCleaner$1.run(IndicesFilterCache.java:184)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:722)
80.3% (401.3ms out of 500ms) cpu usage by thread 'elasticsearch[Braddock, Meggan][generic][T#192]'
10/10 snapshots sharing following 9 elements
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359)
java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:942)
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:722)
Can someone help me with this? Thanks in advance.