# Do close indices consume memory?

**URL:** <https://discuss.elastic.co/t/do-close-indices-consume-memory/86707>\
**Category:** Elasticsearch\
**Created:** [May 22, 2017, 4:27pm UTC](https://discuss.elastic.co/t/do-close-indices-consume-memory/86707 "2017-05-22T16:27:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![animageofmine](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@animageofmine](https://discuss.elastic.co/u/animageofmine)\
**Post date:** [May 22, 2017, 4:27pm UTC](https://discuss.elastic.co/t/do-close-indices-consume-memory/86707/1 "2017-05-22T16:27:39Z")

</div>

Quick and stupid questions. I didn't see that in the [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html):

1. Once you close the index, does it still consume memory (e.g field data) ?
2. How long would it take for the index to open back (assuming that it has to load index/field data again)?

Thanks!

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [May 22, 2017, 4:52pm UTC](https://discuss.elastic.co/t/do-close-indices-consume-memory/86707/2 "2017-05-22T16:52:32Z")

</div>

> [@animageofmine](#):
>
> Once you close the index, does it still consume memory (e.g field data) ?

No.

> [@animageofmine](#):
>
> How long would it take for the index to open back (assuming that it has to load index data again)?

Loading will be fairly quick. Elasticsearch has to populate the metadata with all of the index information. Searches and other queries may be slower until cached.

---

<div class="post-metadata">

**Author:** ![animageofmine](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@animageofmine](https://discuss.elastic.co/u/animageofmine)\
**Post date:** [May 22, 2017, 4:55pm UTC](https://discuss.elastic.co/t/do-close-indices-consume-memory/86707/3 "2017-05-22T16:55:42Z")

</div>

Thanks so much for your quick reply. How long does it take to cache approximately ? Say, an index with 10M documents and 200 fields. I know it all depends on the type of fields, so an approximate answer based on your analysis/testing would be good enough for now.

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [May 22, 2017, 4:58pm UTC](https://discuss.elastic.co/t/do-close-indices-consume-memory/86707/4 "2017-05-22T16:58:57Z")

</div>

Caching doesn't automatically happen. You have to employ warmers (queries that run in the background just to fill your filter caches), or wait for actual queries to do so.

---

<div class="post-metadata">

**Author:** ![animageofmine](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@animageofmine](https://discuss.elastic.co/u/animageofmine)\
**Post date:** [May 22, 2017, 6:54pm UTC](https://discuss.elastic.co/t/do-close-indices-consume-memory/86707/5 "2017-05-22T18:54:20Z")

</div>

Sounds like caching is lazy. Some documentation would be really useful to study the design.

1. What does caching really do?
2. What are warmers?
3. What really happens when you close and reopen the index?

---

<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:** [June 19, 2017, 6:54pm UTC](https://discuss.elastic.co/t/do-close-indices-consume-memory/86707/6 "2017-06-19T18:54:48Z")

</div>

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