# Why is Elasticsearch so hungry for resources?

**URL:** <https://discuss.elastic.co/t/why-is-elasticsearch-so-hungry-for-resources/310891>\
**Category:** Elasticsearch\
**Created:** [July 28, 2022, 3:04pm UTC](https://discuss.elastic.co/t/why-is-elasticsearch-so-hungry-for-resources/310891 "2022-07-28T15:04:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JorgeCarousel](https://avatars.discourse-cdn.com/v4/letter/j/97f17d/32.png) [@JorgeCarousel](https://discuss.elastic.co/u/JorgeCarousel)\
**Post date:** [July 28, 2022, 3:04pm UTC](https://discuss.elastic.co/t/why-is-elasticsearch-so-hungry-for-resources/310891/1 "2022-07-28T15:04:54Z")

</div>

Hey guys,

I downloaded Elasticsearch to try it and it ate 33GB of memory from the start without anything in it yet, I believe it is because it is made in Java and that's what makes it so hungry for resources, have Elastic thought of port their products to another language that's not that hungry like Python or PHP? because we decided not to use it because of this.

I really hope somebody is listening and think about it.

---

<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:** [July 28, 2022, 3:11pm UTC](https://discuss.elastic.co/t/why-is-elasticsearch-so-hungry-for-resources/310891/2 "2022-07-28T15:11:45Z")

</div>

Elasticsearch used to by default be configured to use a 1GB heap. In recent versions the size of the default heap is instead [calculated based on available resources and node roles](https://www.elastic.co/guide/en/elasticsearch/reference/8.3/advanced-configuration.html). This assumes Elasticsearch is running on a dedicated host and has access to all resources and likely roughly follows the best practice of setting the heap to 50% of available RAM, and the heap is allocated on startup.

If you follow the link I provided you will find instructions on how to set the heap size to a smaller value. I would not recommend going below 1GB though.

---

<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:** [July 28, 2022, 11:10pm UTC](https://discuss.elastic.co/t/why-is-elasticsearch-so-hungry-for-resources/310891/3 "2022-07-28T23:10:17Z")

</div>

Welcome to our community! 😃 We aren't all guys though.

> [@JorgeCarousel](#):
>
> I downloaded Elasticsearch to try it and it ate 33GB of memory from the start without anything in it yet

It'd be handy if you elaborated a little more on what you exactly did.

> [@JorgeCarousel](#):
>
> Elastic thought of port their products to another language that's not that hungry like Python or PHP

It's a fair bit more complicated than that unfortunately, and unlikely to happen.

---

<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:** [August 25, 2022, 11:11pm UTC](https://discuss.elastic.co/t/why-is-elasticsearch-so-hungry-for-resources/310891/4 "2022-08-25T23:11:01Z")

</div>

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