# Heap vs doc\_value

**URL:** <https://discuss.elastic.co/t/heap-vs-doc-value/45591>\
**Category:** Elasticsearch\
**Created:** [March 28, 2016, 1:51pm UTC](https://discuss.elastic.co/t/heap-vs-doc-value/45591 "2016-03-28T13:51:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![QD\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/qd_wang/32/8409_2.png) [@QD\_Wang](https://discuss.elastic.co/u/QD_Wang)\
**Post date:** [March 28, 2016, 1:51pm UTC](https://discuss.elastic.co/t/heap-vs-doc-value/45591/1 "2016-03-28T13:51:37Z")

</div>

Hi Everyone

i have a question about doc\_value, as a rule of thumb, we should give half memory to ES heap, but i think this is for ES 1.x, is that right? with ES 2.x, Doc values are enabled by default, so should i still follow this rule?

for example if i have a server with 64GB memeory , give 30GB to ES heap , is that still correct for ES2.X?

please advice

Thanks  
Alps

---

<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:** [March 28, 2016, 9:01pm UTC](https://discuss.elastic.co/t/heap-vs-doc-value/45591/2 "2016-03-28T21:01:32Z")

</div>

> [@QD\_Wang](#):
>
> with ES 2.x, Doc values are enabled by default, so should i still follow this rule?

Yes..

---

<div class="post-metadata">

**Author:** ![QD\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/qd_wang/32/8409_2.png) [@QD\_Wang](https://discuss.elastic.co/u/QD_Wang)\
**Post date:** [March 29, 2016, 4:24pm UTC](https://discuss.elastic.co/t/heap-vs-doc-value/45591/3 "2016-03-29T16:24:12Z")

</div>

Hi Mark

thank you for your response , but according to the [document](https://www.elastic.co/guide/en/elasticsearch/guide/current/doc-values.html) , we should give more memory to filesystem cache

so for a 64GB server , should we allocate 10gb to jvm heap and leave rest of memory to system? please advice

Thanks  
Alps

---

<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:** [March 29, 2016, 7:38pm UTC](https://discuss.elastic.co/t/heap-vs-doc-value/45591/4 "2016-03-29T19:38:42Z")

</div>

No, it says you _can_, not that you should.

Will all the things you do fit in 10GB of heap?

---

<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:04pm UTC](https://discuss.elastic.co/t/heap-vs-doc-value/45591/5 "2017-07-05T23:04:15Z")

</div>


