# Graylog retention strategy and Heap Size

**URL:** <https://community.graylog.org/t/graylog-retention-strategy-and-heap-size/16099>\
**Category:** Graylog Central (peer support)\
**Created:** [June 26, 2020, 5:42pm UTC](https://community.graylog.org/t/graylog-retention-strategy-and-heap-size/16099 "2020-06-26T17:42:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmadtamimi](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@ahmadtamimi](https://community.graylog.org/u/ahmadtamimi)\
**Post date:** [June 26, 2020, 5:42pm UTC](https://community.graylog.org/t/graylog-retention-strategy-and-heap-size/16099/1 "2020-06-26T17:42:41Z")

</div>

Hello ,  
i installed graylog before a while, i faced some problems related to memory configuration(Out of Memory issue),i solved it by increasing graylog heap size and elasticsearch heap size to 2gb for each.(server RAM is 8GB, with 100GB disk space).

for the last week, graylog was stable without any problems.  
i am planning to increase Max number of indices retention strategy for a specific index(API index, please check attached), to be 20 or 30 indices instead of 15 indices…  
if i increased retention strategy for specific index, should i increase server RAM(to increase elasticsearch heap and graylog heap) to match the new retention strategy, or not?

 ![Screen Shot 2020-06-26 at 8.20.05 PM](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/0/04e4db8e2843d14f01b96453ea8ad6b50552db9b.png) ![Screen Shot 2020-06-26 at 8.20.28 PM](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/d/d9cb36eb607930a8b650b5d98dc7836194c7ad87.png) ![Screen Shot 2020-06-26 at 8.35.35 PM](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/d/dfc228734ff19772983972a992f5b5f34d825ea9.png) ![Screen Shot 2020-06-26 at 8.36.24 PM](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/6/6e8d082196c456957f63bf04f0727794ad4723b3.png)

---

<div class="post-metadata">

**Author:** ![makarands](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@makarands](https://community.graylog.org/u/makarands)\
**Post date:** [July 7, 2020, 1:48pm UTC](https://community.graylog.org/t/graylog-retention-strategy-and-heap-size/16099/2 "2020-07-07T13:48:19Z")

</div>

@ahmadtamimi Please check out below link where you will get expected retention strategy.

> **[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.

Hope this will helps you 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [July 21, 2020, 1:48pm UTC](https://community.graylog.org/t/graylog-retention-strategy-and-heap-size/16099/3 "2020-07-21T13:48:29Z")

</div>

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