# How to decrease terms\_memory footprint

**URL:** <https://discuss.elastic.co/t/how-to-decrease-terms-memory-footprint/35533>\
**Category:** Elasticsearch\
**Created:** [November 25, 2015, 9:49am UTC](https://discuss.elastic.co/t/how-to-decrease-terms-memory-footprint/35533 "2015-11-25T09:49:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rusty](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@rusty](https://discuss.elastic.co/u/rusty)\
**Post date:** [November 25, 2015, 9:49am UTC](https://discuss.elastic.co/t/how-to-decrease-terms-memory-footprint/35533/1 "2015-11-25T09:49:51Z")

</div>

Hi! I'm using ES 2.0 to index billions of docs a day (daily indexes for long term usage). The cluster is relatively small (10 data-nodes (heap 30Gb), 3 dedicated masters). Right now I can't increase data-nodes much and looking for affordable solution.

The heap is constantly over 90% (mostly by segments.memory\_in\_bytes). How can I limit the biggest memory eater - terms\_memory\_in\_bytes ?

The old way to limit was removed long time ago ( [https://github.com/elastic/elasticsearch/issues/3912](https://github.com/elastic/elasticsearch/issues/3912) ), but I wonder if any other way to do this in ES 1.7 / 2.x?

As an option I can open and close older indexes at query time (open -\> search -\> close), but IMHO it's time/resource consuming decision. The main disadvantage is the time for open/close operation for periods like a two or three month and the fact that ES can decide to rebalance shards for such indexes.

---

<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 5, 2017, 11:35pm UTC](https://discuss.elastic.co/t/how-to-decrease-terms-memory-footprint/35533/2 "2017-07-05T23:35:58Z")

</div>


