# Is it normal for elastic search to occupy 12 gb of ram

**URL:** <https://discuss.elastic.co/t/is-it-normal-for-elastic-search-to-occupy-12-gb-of-ram/193945>\
**Category:** Elasticsearch\
**Created:** [August 6, 2019, 7:16am UTC](https://discuss.elastic.co/t/is-it-normal-for-elastic-search-to-occupy-12-gb-of-ram/193945 "2019-08-06T07:16:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![iaskdoubt](https://avatars.discourse-cdn.com/v4/letter/i/ed8c4c/32.png) [@iaskdoubt](https://discuss.elastic.co/u/iaskdoubt)\
**Post date:** [August 6, 2019, 7:16am UTC](https://discuss.elastic.co/t/is-it-normal-for-elastic-search-to-occupy-12-gb-of-ram/193945/1 "2019-08-06T07:16:49Z")

</div>

Hi we are using elastic search and have a per day index with a event per second of around 900 and each event having a size of .5 ~ 2 kB . The problem is that our elastic search is occupying a lot of memory .. can any one suggest how to tune to reduce the memory usage. FYI the version we use is 2.2 and there is no scope for upgrade in the near future

---

<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:** [August 6, 2019, 8:20am UTC](https://discuss.elastic.co/t/is-it-normal-for-elastic-search-to-occupy-12-gb-of-ram/193945/2 "2019-08-06T08:20:53Z")

</div>

How many shards do you have in your cluster, and how many nodes? Each shard requires a certain amount of memory, even if empty. A common problem is to have too many shards. Here is an article with more details:

> **[How many shards should I have in my Elasticsearch cluster?](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster)**
>
> If you are looking for practical guidelines around how many indices and shards to have in your cluster, this blog post will help you avoid common pitfalls.

You can also [tune the size of the JVM's heap](https://www.elastic.co/guide/en/elasticsearch/reference/2.2/setup-configuration.html#_environment_variables). Versions as old as 2.2 may become unstable if you do not give them enough heap; more recent versions are much more stable in memory-constrained environments.

---

<div class="post-metadata">

**Author:** ![iaskdoubt](https://avatars.discourse-cdn.com/v4/letter/i/ed8c4c/32.png) [@iaskdoubt](https://discuss.elastic.co/u/iaskdoubt)\
**Post date:** [August 6, 2019, 8:51am UTC](https://discuss.elastic.co/t/is-it-normal-for-elastic-search-to-occupy-12-gb-of-ram/193945/3 "2019-08-06T08:51:13Z")

</div>

We have one shard for each day and have only one node .. but is it normal to occupy 12 gb for such data

---

<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:** [August 6, 2019, 9:07am UTC](https://discuss.elastic.co/t/is-it-normal-for-elastic-search-to-occupy-12-gb-of-ram/193945/4 "2019-08-06T09:07:25Z")

</div>

Yes, but how many shards do you have in the cluster? One per day, but for how many days? With daily indices, 2kb per event \* 1 event per second works out as ~180MB per shard which is far smaller than the recommended size. If you dropped down to 1 shard per month then it'd still only be 5GB per index.

12GB of memory usage is not unusual, but it depends on your JVM settings.

---

<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:** [September 3, 2019, 9:07am UTC](https://discuss.elastic.co/t/is-it-normal-for-elastic-search-to-occupy-12-gb-of-ram/193945/5 "2019-09-03T09:07:27Z")

</div>

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