Help understanding Hotthreads Snapshot -> IndexReader.hashCode, FilterLeafReader, WeightedSpanTermExtractor

Hi there, I've been working with Elasticsearch for about two weeks now so still trying to figure things out. My use-case is that I have some json files stored as rows in multiple MySQL tables and I'm trying to index them all in the same place to ease searching for specific, related documents. These JSON files can have multiple levels of nested fields and objects, but are not particularly large in size - the whole index is only 78MB with 171 documents.

The whole thing mostly works but I get some timeouts from Kibana when I try to do a simple search for a single date and I'm trying to understand why. From the logs I can see I'm spening 25% of my time doing GC. Can someone explain what the underlying issue might be if I get this snapshot:

::: {oiWBrYk}{oiWBrYkYT8qeElqgGx5a-g}{pUeBGDuDTimrWN91rf6MWQ}{}{}{ml.enabled=true}
   Hot threads at 2017-09-04T10:57:59.856Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true:
   50.7% (253.6ms out of 500ms) cpu usage by thread 'elasticsearch[oiWBrYk][search][T#5]'
     8/10 snapshots sharing following 61 elements
       java.lang.System.identityHashCode(Native Method)
       org.elasticsearch.common.util.concurrent.EsExecutors$1.execute($ProfileSecuredRequestHandler.lambda$messageReceived$0($ProfileSecuredRequestHandler$$Lambda$1775/502619236.accept(Unknown Source)
       org.elasticsearch.action.ActionListener$1.onResponse($NodeProfile.lambda$authorizeAsync$5($NodeProfile$$Lambda$1781/212546948.accept(Unknown Source)$AsyncAuthorizer.maybeRun($AsyncAuthorizer.setRunAsRoles($AsyncAuthorizer.authorize($NodeProfile.authorizeAsync($NodeProfile.lambda$inbound$2($NodeProfile$$Lambda$1777/201705869.accept(Unknown Source)

What is the output of java -version for this server that is running Elasticsearch

Would you please show the code cache size that you are running with?

Thanks for responding, I'm running ES in the official docker image
Java version:
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-b12)
OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)

Thanks for responding, please could you tell me how to check this, I'm running on a 16GB machine with 12 GB allocated to docker, and 8GB allocated to ES itself using "ES_JAVA_OPTS=-Xms8g -Xmx8g"

Find the PID of your Elasticsearch instance. Using the JDK enter:

$ jinfo -flag ReservedCodeCacheSize <PID>

where <PID> should be replaced by the PID of your Elasticsearch instance.

Just a note here.

I'm running ES in the official docker image

The "official" image is described here: Install Elasticsearch with Docker | Elasticsearch Guide [8.11] | Elastic

docker pull

Thanks, yes I am using the official image ( And thanks for fscrawler, it's amazing.

1 Like

HI, apologies for taking so long to respond. The ReservedCodeCache size is

elasticsearch | uintx ReservedCodeCacheSize = 251658240 {pd product}

Because I'm running in a docker container without jinfo installed I got this information by adding "ES_JAVA_OPTS=-XX:+PrintFlagsFinal -Xms8g -Xmx8g" to my docker options.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.