# Is there a way to limit RES memory used by ES

**URL:** <https://discuss.elastic.co/t/is-there-a-way-to-limit-res-memory-used-by-es/209100>\
**Category:** Elasticsearch\
**Created:** [November 22, 2019, 5:28pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-limit-res-memory-used-by-es/209100 "2019-11-22T17:28:52Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Mikhail\_Khludnev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikhail_khludnev/32/59591_2.png) [@Mikhail\_Khludnev](https://discuss.elastic.co/u/Mikhail_Khludnev)\
**Post date:** [November 24, 2019, 9:29am UTC](https://discuss.elastic.co/t/is-there-a-way-to-limit-res-memory-used-by-es/209100/5 "2019-11-24T09:29:05Z")

</div>

FYI, there's -XX:MaxRAM option. I've found it vital to run any java under docker, and wondering why there's no much fame for it in community. Some explanations can be found around [https://developers.redhat.com/blog/2017/04/04/openjdk-and-containers/](https://developers.redhat.com/blog/2017/04/04/openjdk-and-containers/). Note, I haven't ever check ES's startup .sh and don't know whether it controls -XX:MaxRAM at all.

---

_[View the full topic](https://discuss.elastic.co/t/is-there-a-way-to-limit-res-memory-used-by-es/209100)._
