# Elasticsearch making app super slow

**URL:** https://discuss.elastic.co/t/elasticsearch-making-app-super-slow/227857
**Category:** Elasticsearch
**Created:** [April 14, 2020, 6:30am UTC](https://discuss.elastic.co/t/elasticsearch-making-app-super-slow/227857 "2020-04-14T06:30:48Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jonaspreisler](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonaspreisler/32/37421_2.png) [@jonaspreisler](https://discuss.elastic.co/u/jonaspreisler)
#### Post date: [April 14, 2020, 6:30am UTC](https://discuss.elastic.co/t/elasticsearch-making-app-super-slow/227857/1 "2020-04-14T06:30:49Z")

</div>

I use Elasticsearch on Ububtu for my Rails app. After starting Elasticsearch, my app take 30+ seconds to load.

Server: 8GB RAM.

Before starting Elasticsearch: 5-600MB RAM in use

After starting Elasticsearch: 2.5BG+ RAM in use

Noone is using the app. Nothing is being indexed.

Is this normal?  
Are there a common rule to put Elasticsearch on a seperate server?  
Any idea how to fix this?

Thank you

- Jonas

---

<div class="post-metadata">

### Author: ![jonaspreisler](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonaspreisler/32/37421_2.png) [@jonaspreisler](https://discuss.elastic.co/u/jonaspreisler)
#### Post date: [April 16, 2020, 6:14am UTC](https://discuss.elastic.co/t/elasticsearch-making-app-super-slow/227857/2 "2020-04-16T06:14:59Z")

</div>

Anyone here?

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [April 16, 2020, 6:40am UTC](https://discuss.elastic.co/t/elasticsearch-making-app-super-slow/227857/4 "2020-04-16T06:40:46Z")

</div>

> [@jonaspreisler](#):
>
> Is this normal?

It sounds fairly normal, yes. 30 seconds to start up Elasticsearch isn't unreasonable, and it could easily reserve itself 2GB of RAM. I'm not sure there's really a fix apart from that you should not expect Elasticsearch to start up instantly and should generally keep it running to avoid all the extra work it needs to do at startup and to keep caches warm.

---

<div class="post-metadata">

### Author: ![jonaspreisler](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonaspreisler/32/37421_2.png) [@jonaspreisler](https://discuss.elastic.co/u/jonaspreisler)
#### Post date: [April 23, 2020, 1:49pm UTC](https://discuss.elastic.co/t/elasticsearch-making-app-super-slow/227857/5 "2020-04-23T13:49:08Z")

</div>

it's using 4GB swap as well, and 2GB cache.

How to reduce that? Or is it necessary?

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [April 23, 2020, 2:03pm UTC](https://discuss.elastic.co/t/elasticsearch-making-app-super-slow/227857/6 "2020-04-23T14:03:58Z")

</div>

You should [not be using swap](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html#setup-configuration-memory).

---

<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: [May 21, 2020, 2:04pm UTC](https://discuss.elastic.co/t/elasticsearch-making-app-super-slow/227857/7 "2020-05-21T14:04:03Z")

</div>

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