# High CPU usage elasticsearch

**URL:** <https://discuss.elastic.co/t/high-cpu-usage-elasticsearch/304085>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-monitoring\
**Created:** [May 6, 2022, 5:31am UTC](https://discuss.elastic.co/t/high-cpu-usage-elasticsearch/304085 "2022-05-06T05:31:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dishant.sharma](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@dishant.sharma](https://discuss.elastic.co/u/dishant.sharma)\
**Post date:** [May 6, 2022, 5:31am UTC](https://discuss.elastic.co/t/high-cpu-usage-elasticsearch/304085/1 "2022-05-06T05:31:17Z")

</div>

I have created an Elasticsearch plugin. It is working absolutely fine. But, in the case of bulk indexing, it is getting a request timeout, and when I checked the CPU usage, it was showing 101.76% usage.

I am using a lot of token filters inside my mapping which were created in the plugin itself. Is that the reason why it was showing such behavior or there can be some other reason?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 6, 2022, 5:45am UTC](https://discuss.elastic.co/t/high-cpu-usage-elasticsearch/304085/2 "2022-05-06T05:45:05Z")

</div>

What does the plugin have to do with bulk indexing exactly?

---

<div class="post-metadata">

**Author:** ![dishant.sharma](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@dishant.sharma](https://discuss.elastic.co/u/dishant.sharma)\
**Post date:** [May 6, 2022, 6:25am UTC](https://discuss.elastic.co/t/high-cpu-usage-elasticsearch/304085/3 "2022-05-06T06:25:38Z")

</div>

The plugin is analyzing a large batch of documents (around 250 documents per batch) and indexes them.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 6, 2022, 7:02am UTC](https://discuss.elastic.co/t/high-cpu-usage-elasticsearch/304085/4 "2022-05-06T07:02:54Z")

</div>

Do you get the same high cpu using just the bulk API?

---

<div class="post-metadata">

**Author:** ![dishant.sharma](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@dishant.sharma](https://discuss.elastic.co/u/dishant.sharma)\
**Post date:** [May 9, 2022, 6:40am UTC](https://discuss.elastic.co/t/high-cpu-usage-elasticsearch/304085/5 "2022-05-09T06:40:02Z")

</div>

Yes, I am getting that with bulk API only.

---

<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:** [June 6, 2022, 6:40am UTC](https://discuss.elastic.co/t/high-cpu-usage-elasticsearch/304085/6 "2022-06-06T06:40:16Z")

</div>

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