# Poor performance Elasticsearch

**URL:** <https://discuss.elastic.co/t/poor-performance-elasticsearch/125591>\
**Category:** Elasticsearch\
**Created:** [March 26, 2018, 11:14am UTC](https://discuss.elastic.co/t/poor-performance-elasticsearch/125591 "2018-03-26T11:14:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexruizdlc](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@alexruizdlc](https://discuss.elastic.co/u/alexruizdlc)\
**Post date:** [March 26, 2018, 11:14am UTC](https://discuss.elastic.co/t/poor-performance-elasticsearch/125591/1 "2018-03-26T11:14:26Z")

</div>

Hi, I'm having problem with my elasticsearch running server. At the beginning it was working fine, when I needed to update Data. But suddenly after trying to update several files at once (5 files), the system is performing poorly, taking more than 7 or 8 hours to process a file, when previously is was 1 hour. Also, the performance problem has reached Kibana (it takes 2 minutes to load the main page with date and previously it was less than a second). I think the problem is because of the heap ( which is configured as -Xms2g -Xmx8g) and, for example, Kibana is using 99%. I tried to delete all the indices from the node and the problem persist.  
I tried to set up bootstrap.mlockall: true, but the server that's allow it (Unable to lock JVM Memory: error=12,reason=Cannot allocate memory).  
The server has 8GB of RAM.

This is the current status of the health state cluster:  
{  
"cluster\_name" : "elasticsearch",  
"status" : "green",  
"timed\_out" : false,  
"number\_of\_nodes" : 1,  
"number\_of\_data\_nodes" : 1,  
"active\_primary\_shards" : 6,  
"active\_shards" : 6,  
"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.0  
}

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 26, 2018, 11:21am UTC](https://discuss.elastic.co/t/poor-performance-elasticsearch/125591/2 "2018-03-26T11:21:34Z")

</div>

You should follow [these guidelines](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/heap-size.html) when setting the heap size.

---

<div class="post-metadata">

**Author:** ![alexruizdlc](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@alexruizdlc](https://discuss.elastic.co/u/alexruizdlc)\
**Post date:** [March 27, 2018, 8:44am UTC](https://discuss.elastic.co/t/poor-performance-elasticsearch/125591/3 "2018-03-27T08:44:01Z")

</div>

Before posting this, the heap size was set up 2GB min and 8 GB max. Now I've changed it according to your link with 4GB max, but the performance is the same.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 27, 2018, 8:58am UTC](https://discuss.elastic.co/t/poor-performance-elasticsearch/125591/4 "2018-03-27T08:58:36Z")

</div>

What kind of storage do you have? What does disk I/O and iowait look like when you are updating? How are you performing the updates?

---

<div class="post-metadata">

**Author:** ![alexruizdlc](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@alexruizdlc](https://discuss.elastic.co/u/alexruizdlc)\
**Post date:** [March 28, 2018, 12:52pm UTC](https://discuss.elastic.co/t/poor-performance-elasticsearch/125591/5 "2018-03-28T12:52:32Z")

</div>

> [@Christian\_Dahlqvist](#):
>
> iowait

right now the performance when executing filebeat is:  
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

### root 20 0 4604800 476744 18296 S 148.5 5.8 3:01.82 java

### elastic+ 20 0 8042688 687640 19948 S 48.5 8.4 1:18.83. java

### root 20 0 379012 27884 8644 S 30.9 0.3 0:15.81 filebeat

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 28, 2018, 1:09pm UTC](https://discuss.elastic.co/t/poor-performance-elasticsearch/125591/6 "2018-03-28T13:09:24Z")

</div>

Can you run `iostat -x` while the update is going on?

What type of disk do you have?

How are you performing the updates?

---

<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:** [April 25, 2018, 1:09pm UTC](https://discuss.elastic.co/t/poor-performance-elasticsearch/125591/7 "2018-04-25T13:09:51Z")

</div>

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