# Elasticsearch Super Slow and using low CPU

**URL:** <https://discuss.elastic.co/t/elasticsearch-super-slow-and-using-low-cpu/313922>\
**Category:** Elasticsearch\
**Created:** [September 7, 2022, 6:26pm UTC](https://discuss.elastic.co/t/elasticsearch-super-slow-and-using-low-cpu/313922 "2022-09-07T18:26:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![abr4xc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abr4xc/32/108999_2.png) [@abr4xc](https://discuss.elastic.co/u/abr4xc)\
**Post date:** [September 7, 2022, 6:26pm UTC](https://discuss.elastic.co/t/elasticsearch-super-slow-and-using-low-cpu/313922/1 "2022-09-07T18:26:03Z")

</div>

After gone offline for a day the elastic cluster started to be too slow, check of possible misconfigurations and could not fine anything to make it faster, the cluster is on green and there is not unassing shards, however its using less that 20% of the CPU and it is super slow.

here is and image of the nodes status

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/9/990cd307793922eff4b82fdb383abce0afb6044b.png)

and also the cluster status

```auto
{
  "cluster_name": "xxx",
  "status": "green",
  "timed_out": false,
  "number_of_nodes": 2,
  "number_of_data_nodes": 2,
  "active_primary_shards": 994,
  "active_shards": 1988,
  "relocating_shards": 0,
  "initializing_shards": 0,
  "unassigned_shards": 0,
  "delayed_unassigned_shards": 0,
  "number_of_pending_tasks": 0,
  "number_of_in_flight_fetch": 0,
  "task_max_waiting_in_queue_millis": 0,
  "active_shards_percent_as_number": 100
}

```

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [September 7, 2022, 6:28pm UTC](https://discuss.elastic.co/t/elasticsearch-super-slow-and-using-low-cpu/313922/2 "2022-09-07T18:28:34Z")

</div>

What are the specs of your nodes?

You have a lot of shards for just two nodes, also, look at the load for your master node, it is at 22, this is very high.

---

<div class="post-metadata">

**Author:** ![abr4xc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abr4xc/32/108999_2.png) [@abr4xc](https://discuss.elastic.co/u/abr4xc)\
**Post date:** [September 7, 2022, 6:30pm UTC](https://discuss.elastic.co/t/elasticsearch-super-slow-and-using-low-cpu/313922/3 "2022-09-07T18:30:47Z")

</div>

each node has 64G of ram, 16VCPUs and 1TB disk

---

<div class="post-metadata">

**Author:** ![BenB196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benb196/32/83401_2.png) [@BenB196](https://discuss.elastic.co/u/BenB196)\
**Post date:** [September 7, 2022, 10:55pm UTC](https://discuss.elastic.co/t/elasticsearch-super-slow-and-using-low-cpu/313922/4 "2022-09-07T22:55:48Z")

</div>

I don't see it in your post, but what version of Elasticsearch are you running? 8.x receive a good number of improvements with many shards, so if you're running something like 7.x you might want to consider upgrading.

Also, general question, what makes you think the cluster is slow? Is there a specific use case you've seen issues with? Can you provide examples of the issue that "shows" slowness?

---

<div class="post-metadata">

**Author:** ![abr4xc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abr4xc/32/108999_2.png) [@abr4xc](https://discuss.elastic.co/u/abr4xc)\
**Post date:** [September 8, 2022, 12:42am UTC](https://discuss.elastic.co/t/elasticsearch-super-slow-and-using-low-cpu/313922/5 "2022-09-08T00:42:52Z")

</div>

im using version 8.3.3 but im planing to update to the latest on the weekend, i say that is slow bc every time i try to do anything in kibana i takes more than normal, looking at alerts, searching for information or loading any dashboards, i think it is Elasticsearch bc is using so low CPU and that was not normal before

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [September 8, 2022, 1:23am UTC](https://discuss.elastic.co/t/elasticsearch-super-slow-and-using-low-cpu/313922/6 "2022-09-08T01:23:48Z")

</div>

What is the heap for each node?

The way to calculate how many shards you should have in a node based on the heap size changed in `8.3`, but based on your disk size you seem to have too many small shards.

Assuming that you have something close to 420 GB of data, with 994 shard this would give an average of 422 MB per shard. You should aim to have a shard size between 10 GB and 50 GB.

What is your use case? Do you have time based data?

Also, your CPU usage may be low, but your load is high for your specs, you showed a load of 22 for a 16 cpu node, this could mean that the disk in this node is having some issues with the amount of I/O.

---

<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:** [October 6, 2022, 1:23am UTC](https://discuss.elastic.co/t/elasticsearch-super-slow-and-using-low-cpu/313922/7 "2022-10-06T01:23:53Z")

</div>

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