# Throttling fixed bitset cache

**URL:** <https://discuss.elastic.co/t/throttling-fixed-bitset-cache/43639>\
**Category:** Elasticsearch\
**Created:** [March 7, 2016, 10:33am UTC](https://discuss.elastic.co/t/throttling-fixed-bitset-cache/43639 "2016-03-07T10:33:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jxerome](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jxerome/32/44932_2.png) [@jxerome](https://discuss.elastic.co/u/jxerome)\
**Post date:** [March 7, 2016, 10:33am UTC](https://discuss.elastic.co/t/throttling-fixed-bitset-cache/43639/1 "2016-03-07T10:33:54Z")

</div>

Hello,

Is there any way to throttle fixed bitset cache (in 1.7 or at least in 2.x)?  
I have a client cluster whose 8 GB heap memory is saturated by fixed bitset cache after five minutes.

The cluster avoid OutOfMemoryException by setting `index.load_fixed_bitset_filters_eagerly` to `false` and clearing cache every 5 minutes, which is not a durable situation.

Other caches (cache field and cache filter) are OK.

I know that the principal reason is due to massive usage of nested fields in filters and sort using neasted\_filter as in [https://github.com/elastic/elasticsearch/issues/10224](https://github.com/elastic/elasticsearch/issues/10224) and that the best solution is to migrate to Elasticsearch 2.2.

But I would like to be able to throttle this cache. First as a temporary solution, the time to do the migration since the latter requires time and eviction on fixed bitset cache should be better than periodically clearing all caches. Then, because I don't want to prevent node crashes in case migration to 2.2 would not fix the problem.

Thank you.

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [March 8, 2016, 10:18am UTC](https://discuss.elastic.co/t/throttling-fixed-bitset-cache/43639/2 "2016-03-08T10:18:31Z")

</div>

There was a bug that caused this cache to duplicate its content, maybe you are affected? [https://github.com/elastic/elasticsearch/pull/15836](https://github.com/elastic/elasticsearch/pull/15836)

---

<div class="post-metadata">

**Author:** ![jxerome](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jxerome/32/44932_2.png) [@jxerome](https://discuss.elastic.co/u/jxerome)\
**Post date:** [March 8, 2016, 1:13pm UTC](https://discuss.elastic.co/t/throttling-fixed-bitset-cache/43639/3 "2016-03-08T13:13:38Z")

</div>

That might be a cause since their real version is 1.7.3.

By the way I support your idea to read fixed bitset from the disk.  
It would be a good idea.

Thank you, Adrien.

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [March 8, 2016, 1:18pm UTC](https://discuss.elastic.co/t/throttling-fixed-bitset-cache/43639/4 "2016-03-08T13:18:02Z")

</div>

You're welcome Jérôme!

---

<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:10pm UTC](https://discuss.elastic.co/t/throttling-fixed-bitset-cache/43639/5 "2017-07-05T23:10:23Z")

</div>


