# Node memory

**URL:** <https://discuss.elastic.co/t/node-memory/275634>\
**Category:** Elasticsearch\
**Created:** [June 11, 2021, 1:36am UTC](https://discuss.elastic.co/t/node-memory/275634 "2021-06-11T01:36:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bevano](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@bevano](https://discuss.elastic.co/u/bevano)\
**Post date:** [June 11, 2021, 1:36am UTC](https://discuss.elastic.co/t/node-memory/275634/1 "2021-06-11T01:36:46Z")

</div>

Hi All,  
Currently on our nodes we have 64GB RAM, with 30GB allocated to the heap, and the other 34GB for OS.

I understand that I shouldn't allocate more then 30GB to the heap, but will ES/OS benefit from 128GB or 256GB RAM within the system? So allocating 30GB to the heap and leaving the 98GB/226GB RAM for the OS.

Thanks

---

<div class="post-metadata">

**Author:** ![rcowart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rcowart/32/88091_2.png) [@rcowart](https://discuss.elastic.co/u/rcowart)\
**Post date:** [June 12, 2021, 12:36pm UTC](https://discuss.elastic.co/t/node-memory/275634/2 "2021-06-12T12:36:01Z")

</div>

You can actually set heap to 31GB. The primary benefit of providing the OS with more RAM is having a larger page cache. This can reduce the number of disk reads necessary for completing queries, and thus improve performance. That said, there will be diminishing returns beyond 128GB total RAM.

If you have very large servers, e.g. 64 cores/128 theads and 256GB or more RAM, you will usually get better results running multiple ES nodes on the server. It is however important that each server has its own dedicated storage. If you run multiple nodes and really want to maximize performance, you can bind each node to specific cores, respecting socket and chiplet (on EPYC) boundaries.

---

<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:** [June 12, 2021, 4:50pm UTC](https://discuss.elastic.co/t/node-memory/275634/3 "2021-06-12T16:50:14Z")

</div>

> [@bevano](#):
>
> will ES/OS benefit from 128GB or 256GB RAM within the system? So allocating 30GB to the heap and leaving the 98GB/226GB RAM for the OS.

Yes there may be benefits to doing that. The extra memory will be used for filesystem cache, which can give a big performance boost.

---

<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:** [July 10, 2021, 4:50pm UTC](https://discuss.elastic.co/t/node-memory/275634/4 "2021-07-10T16:50:46Z")

</div>

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