# Thread Pool Management

**URL:** <https://discuss.elastic.co/t/thread-pool-management/288275>\
**Category:** Elasticsearch\
**Created:** [November 3, 2021, 12:33am UTC](https://discuss.elastic.co/t/thread-pool-management/288275 "2021-11-03T00:33:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsousahs](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tsousahs](https://discuss.elastic.co/u/tsousahs)\
**Post date:** [November 3, 2021, 12:33am UTC](https://discuss.elastic.co/t/thread-pool-management/288275/1 "2021-11-03T00:33:34Z")

</div>

Hello,

We are seeing a lot of CPU processing without much indexing activity. I have run the following command to see the hot thread:

```auto
GET _nodes/hot_threads

```

which i got the following output.

```auto
100.5% (502.6ms out of 500ms) cpu usage by thread 'elasticsearch[helasticsearch001][management][T#4]'
     4/10 snapshots sharing following 32 elements
       app//org.elasticsearch.common.xcontent.support.AbstractXContentParser.readValueUnsafe(AbstractXContentParser.java:387)
       app//org.elasticsearch.common.xcontent.support.AbstractXContentParser.readMapEntries(AbstractXContentParser.java:316)
       app//org.elasticsearch.common.xcontent.support.AbstractXContentParser.readValueUnsafe(AbstractXContentParser.java:387)
       app//org.elasticsearch.common.xcontent.support.AbstractXContentParser.readMapEntries(AbstractXContentParser.java:316)
       app//org.elasticsearch.common.xcontent.support.AbstractXContentParser.readValueUnsafe(AbstractXContentParser.java:387)
       app//org.elasticsearch.common.xcontent.support.AbstractXContentParser.readMapEntries(AbstractXContentParser.java:316)
       app//org.elasticsearch.common.xcontent.support.AbstractXContentParser.readValueUnsafe(AbstractXContentParser.java:387)
       app//org.elasticsearch.common.xcontent.support.AbstractXContentParser.readMapEntries(AbstractXContentParser.java:316)
       app//org.elasticsearch.common.xcontent.support.AbstractXContentParser.readValueUnsafe(AbstractXContentParser.java:387)
       app//org.elasticsearch.common.xcontent.support.AbstractXContentParser.readMapEntries(AbstractXContentParser.java:316)
       app//org.elasticsearch.common.xcontent.support.AbstractXContentParser.readValueUnsafe(AbstractXContentParser.java:387)
       app//org.elasticsearch.common.xcontent.support.AbstractXContentParser.readMapEntries(AbstractXContentParser.java:316)
       app//org.elasticsearch.common.xcontent.support.AbstractXContentParser.readMapSafe(AbstractXContentParser.java:305)
       app//org.elasticsearch.common.xcontent.support.AbstractXContentParser.mapOrdered(AbstractXContentParser.java:260)
       app//org.elasticsearch.common.xcontent.XContentHelper.convertToMap(XContentHelper.java:158)
       app//org.elasticsearch.common.xcontent.XContentHelper.convertToMap(XContentHelper.java:128)
       app//org.elasticsearch.common.xcontent.XContentHelper.convertToMap(XContentHelper.java:90)
       app//org.elasticsearch.cluster.metadata.MappingMetadata.sourceAsMap(MappingMetadata.java:137)
       app//org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse.toXContent(GetMappingsResponse.java:124)
       app//org.elasticsearch.rest.action.admin.indices.RestGetMappingAction$1$1.buildResponse(RestGetMappingAction.java:168)
       app//org.elasticsearch.rest.action.admin.indices.RestGetMappingAction$1$1.buildResponse(RestGetMappingAction.java:117)
       app//org.elasticsearch.rest.action.RestBuilderListener.buildResponse(RestBuilderListener.java:27)
       app//org.elasticsearch.rest.action.RestResponseListener.processResponse(RestResponseListener.java:26)
       app//org.elasticsearch.rest.action.RestActionListener.onResponse(RestActionListener.java:36)
       app//org.elasticsearch.rest.action.admin.indices.RestGetMappingAction$1.lambda$processResponse$0(RestGetMappingAction.java:174)
       app//org.elasticsearch.rest.action.admin.indices.RestGetMappingAction$1$$Lambda$8662/0x0000000801e7b8d8.accept(Unknown Source)
       app//org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62)
       app//org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)
       app//org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
       java.base@16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
       java.base@16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
       java.base@16/java.lang.Thread.run(Thread.java:831)
     2/10 snapshots sharing following 28 elements
       app//org.elasticsearch.common.xcontent.XContentBuilder.unknownValue(XContentBuilder.java:814)
       app//org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:887)
       app//org.elasticsearch.common.xcontent.XContentBuilder.unknownValue(XContentBuilder.java:814)
       app//org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:887)
       app//org.elasticsearch.common.xcontent.XContentBuilder.unknownValue(XContentBuilder.java:814)
       app//org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:887)
       app//org.elasticsearch.common.xcontent.XContentBuilder.unknownValue(XContentBuilder.java:814)
       app//org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:887)
       app//org.elasticsearch.common.xcontent.XContentBuilder.unknownValue(XContentBuilder.java:814)
       app//org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:887)
       app//org.elasticsearch.common.xcontent.XContentBuilder.unknownValue(XContentBuilder.java:814)
       app//org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:887)
       app//org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:862)
       app//org.elasticsearch.common.xcontent.XContentBuilder.field(XContentBuilder.java:858)
       app//org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse.toXContent(GetMappingsResponse.java:124)
       app//org.elasticsearch.rest.action.admin.indices.RestGetMappingAction$1$1.buildResponse(RestGetMappingAction.java:168)
       app//org.elasticsearch.rest.action.admin.indices.RestGetMappingAction$1$1.buildResponse(RestGetMappingAction.java:117)
       app//org.elasticsearch.rest.action.RestBuilderListener.buildResponse(RestBuilderListener.java:27)
       app//org.elasticsearch.rest.action.RestResponseListener.processResponse(RestResponseListener.java:26)
       app//org.elasticsearch.rest.action.RestActionListener.onResponse(RestActionListener.java:36)
       app//org.elasticsearch.rest.action.admin.indices.RestGetMappingAction$1.lambda$processResponse$0(RestGetMappingAction.java:174)
       app//org.elasticsearch.rest.action.admin.indices.RestGetMappingAction$1$$Lambda$8662/0x0000000801e7b8d8.accept(Unknown Source)
       app//org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62)
       app//org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)
       app//org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
       java.base@16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
       java.base@16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
       java.base@16/java.lang.Thread.run(Thread.java:831)
     2/10 snapshots sharing following 25 elements
       app//org.elasticsearch.common.xcontent.XContentBuilder.ensureNoSelfReferences(XContentBuilder.java:1052)
       app//org.elasticsearch.common.xcontent.XContentBuilder.ensureNoSelfReferences(XContentBuilder.java:1053)
       app//org.elasticsearch.common.xcontent.XContentBuilder.ensureNoSelfReferences(XContentBuilder.java:1053)
       app//org.elasticsearch.common.xcontent.XContentBuilder.ensureNoSelfReferences(XContentBuilder.java:1053)
       app//org.elasticsearch.common.xcontent.XContentBuilder.ensureNoSelfReferences(XContentBuilder.java:1053)
       app//org.elasticsearch.common.xcontent.XContentBuilder.ensureNoSelfReferences(XContentBuilder.java:1053)
       app//org.elasticsearch.common.xcontent.XContentBuilder.ensureNoSelfReferences(XContentBuilder.java:1053)
       app//org.elasticsearch.common.xcontent.XContentBuilder.ensureNoSelfReferences(XContentBuilder.java:1028)
       app//org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:878)
       app//org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:862)
       app//org.elasticsearch.common.xcontent.XContentBuilder.field(XContentBuilder.java:858)
       app//org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse.toXContent(GetMappingsResponse.java:124)
       app//org.elasticsearch.rest.action.admin.indices.RestGetMappingAction$1$1.buildResponse(RestGetMappingAction.java:168)
       app//org.elasticsearch.rest.action.admin.indices.RestGetMappingAction$1$1.buildResponse(RestGetMappingAction.java:117)
       app//org.elasticsearch.rest.action.RestBuilderListener.buildResponse(RestBuilderListener.java:27)
       app//org.elasticsearch.rest.action.RestResponseListener.processResponse(RestResponseListener.java:26)
       app//org.elasticsearch.rest.action.RestActionListener.onResponse(RestActionListener.java:36)
       app//org.elasticsearch.rest.action.admin.indices.RestGetMappingAction$1.lambda$processResponse$0(RestGetMappingAction.java:174)
       app//org.elasticsearch.rest.action.admin.indices.RestGetMappingAction$1$$Lambda$8662/0x0000000801e7b8d8.accept(Unknown Source)
       app//org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62)
       app//org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)
       app//org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
       java.base@16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
       java.base@16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
       java.base@16/java.lang.Thread.run(Thread.java:831)
     2/10 snapshots sharing following 14 elements
       app//org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse.toXContent(GetMappingsResponse.java:124)
       app//org.elasticsearch.rest.action.admin.indices.RestGetMappingAction$1$1.buildResponse(RestGetMappingAction.java:168)
       app//org.elasticsearch.rest.action.admin.indices.RestGetMappingAction$1$1.buildResponse(RestGetMappingAction.java:117)
       app//org.elasticsearch.rest.action.RestBuilderListener.buildResponse(RestBuilderListener.java:27)
       app//org.elasticsearch.rest.action.RestResponseListener.processResponse(RestResponseListener.java:26)
       app//org.elasticsearch.rest.action.RestActionListener.onResponse(RestActionListener.java:36)
       app//org.elasticsearch.rest.action.admin.indices.RestGetMappingAction$1.lambda$processResponse$0(RestGetMappingAction.java:174)
       app//org.elasticsearch.rest.action.admin.indices.RestGetMappingAction$1$$Lambda$8662/0x0000000801e7b8d8.accept(Unknown Source)
       app//org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62)
       app//org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)
       app//org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
       java.base@16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
       java.base@16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
       java.base@16/java.lang.Thread.run(Thread.java:831)

```

What is the reference to _AbstractXContentParser_ mean? Is it a index mapping inefficiency?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 1, 2021, 12:33am UTC](https://discuss.elastic.co/t/thread-pool-management/288275/2 "2021-12-01T00:33:45Z")

</div>

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