# Limit index memory

**URL:** <https://discuss.elastic.co/t/limit-index-memory/330319>\
**Category:** Elasticsearch\
**Created:** [April 19, 2023, 2:45pm UTC](https://discuss.elastic.co/t/limit-index-memory/330319 "2023-04-19T14:45:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pabloochoa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pabloochoa/32/101377_2.png) [@pabloochoa](https://discuss.elastic.co/u/pabloochoa)\
**Post date:** [April 19, 2023, 2:45pm UTC](https://discuss.elastic.co/t/limit-index-memory/330319/1 "2023-04-19T14:45:20Z")

</div>

Don't know if this has already been asked, but I haven't been able to find either any question or documentation related to this issue.  
The thing is that I would like to limit the size of all the indeces of my Elastic, and when the memory limit is reached, the new incoming info would overwrite the oldest.  
I am a bit unsure if this could be possible, but any help on how to resolve this problem is very welcome.

---

<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:** [April 19, 2023, 11:45pm UTC](https://discuss.elastic.co/t/limit-index-memory/330319/2 "2023-04-19T23:45:56Z")

</div>

What sort of data are you talking about here?

---

<div class="post-metadata">

**Author:** ![pabloochoa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pabloochoa/32/101377_2.png) [@pabloochoa](https://discuss.elastic.co/u/pabloochoa)\
**Post date:** [April 20, 2023, 7:34am UTC](https://discuss.elastic.co/t/limit-index-memory/330319/3 "2023-04-20T07:34:19Z")

</div>

It is mainly data from the Apache Ranger audit. As sometimes (when a lot of users are logging in,...) the data stored here can grow a lot, I thought that the best way to deal with it was limiting this index (although there are more stored in my ES instance, it is not the only one), although I don't know if this could be done in ES.

---

<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:** [April 20, 2023, 7:35am UTC](https://discuss.elastic.co/t/limit-index-memory/330319/4 "2023-04-20T07:35:46Z")

</div>

Is that time based data?  
If so use [ILM](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html).

---

<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:** [May 18, 2023, 7:36am UTC](https://discuss.elastic.co/t/limit-index-memory/330319/5 "2023-05-18T07:36:22Z")

</div>

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