# DocValues overhead in ES

**URL:** <https://discuss.elastic.co/t/docvalues-overhead-in-es/22897>\
**Category:** Elasticsearch\
**Created:** [March 25, 2015, 4:05pm UTC](https://discuss.elastic.co/t/docvalues-overhead-in-es/22897 "2015-03-25T16:05:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pawel\_Rog](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pawel_rog/32/141223_2.png) [@Pawel\_Rog](https://discuss.elastic.co/u/Pawel_Rog)\
**Post date:** [March 25, 2015, 4:05pm UTC](https://discuss.elastic.co/t/docvalues-overhead-in-es/22897/1 "2015-03-25T16:05:39Z")

</div>

Hi,  
I analyzed heap dump taken from Elasticsearch and I can see a lot of space  
in heap is occupied by structures and references related to doc values. I  
can see tons of hash maps with weak references pointing to objects  
representing some values in DV. I was wondering if this is somehow cached  
on ES side or it is totally Lucene internal mechanism. Can we influence the  
size/number of instances of objects connected to field data?

I'd be glad if someone can explain it to me.

--  
Paweł Róg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAHngsdhxHCDXXcx\_NzcDNd%2BPnMJ%3DQigcscNXfn8kcjSCh4x3mg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHngsdhxHCDXXcx_NzcDNd%2BPnMJ%3DQigcscNXfn8kcjSCh4x3mg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 26, 2015, 2:31am UTC](https://discuss.elastic.co/t/docvalues-overhead-in-es/22897/2 "2015-03-26T02:31:13Z")

</div>

If you have a lot of unique values and you ask for aggregations looking for  
unique values amongst though, then what you are seeing can happen.

On 26 March 2015 at 03:05, Paweł Róg [prog88@gmail.com](mailto:prog88@gmail.com) wrote:

> Hi,  
> I analyzed heap dump taken from Elasticsearch and I can see a lot of space  
> in heap is occupied by structures and references related to doc values. I  
> can see tons of hash maps with weak references pointing to objects  
> representing some values in DV. I was wondering if this is somehow cached  
> on ES side or it is totally Lucene internal mechanism. Can we influence the  
> size/number of instances of objects connected to field data?
> 
> I'd be glad if someone can explain it to me.
> 
> --  
> Paweł Róg
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAHngsdhxHCDXXcx\_NzcDNd%2BPnMJ%3DQigcscNXfn8kcjSCh4x3mg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHngsdhxHCDXXcx_NzcDNd%2BPnMJ%3DQigcscNXfn8kcjSCh4x3mg%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAHngsdhxHCDXXcx\_NzcDNd%2BPnMJ%3DQigcscNXfn8kcjSCh4x3mg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAHngsdhxHCDXXcx_NzcDNd%2BPnMJ%3DQigcscNXfn8kcjSCh4x3mg%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X\_EO8N%2B1f%3D7spiQzXYp-71OhPcmT3n09pei-52cdvANrg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_EO8N%2B1f%3D7spiQzXYp-71OhPcmT3n09pei-52cdvANrg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Pawel\_Rog](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pawel_rog/32/141223_2.png) [@Pawel\_Rog](https://discuss.elastic.co/u/Pawel_Rog)\
**Post date:** [March 26, 2015, 8:23am UTC](https://discuss.elastic.co/t/docvalues-overhead-in-es/22897/3 "2015-03-26T08:23:14Z")

</div>

Hi,  
Thank you for your response. Unfortunately I think we misunderstood. I was  
NOT asking if described case can happen because I see it can 🙂 I was  
rather asking about ES internals and if there is any way to optimize such a  
case (including source code modifications).

--  
Paweł Róg

On Thursday, March 26, 2015 at 3:31:51 AM UTC+1, Mark Walkom wrote:

> If you have a lot of unique values and you ask for aggregations looking  
> for unique values amongst though, then what you are seeing can happen.
> 
> On 26 March 2015 at 03:05, Paweł Róg \<[pro...@gmail.com](mailto:pro...@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > Hi,  
> > I analyzed heap dump taken from Elasticsearch and I can see a lot of  
> > space in heap is occupied by structures and references related to doc  
> > values. I can see tons of hash maps with weak references pointing to  
> > objects representing some values in DV. I was wondering if this is somehow  
> > cached on ES side or it is totally Lucene internal mechanism. Can we  
> > influence the size/number of instances of objects connected to field data?
> > 
> > I'd be glad if someone can explain it to me.
> > 
> > --  
> > Paweł Róg
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAHngsdhxHCDXXcx\_NzcDNd%2BPnMJ%3DQigcscNXfn8kcjSCh4x3mg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHngsdhxHCDXXcx_NzcDNd%2BPnMJ%3DQigcscNXfn8kcjSCh4x3mg%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAHngsdhxHCDXXcx\_NzcDNd%2BPnMJ%3DQigcscNXfn8kcjSCh4x3mg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAHngsdhxHCDXXcx_NzcDNd%2BPnMJ%3DQigcscNXfn8kcjSCh4x3mg%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/1bb6b0b3-c261-4f37-b0e0-3bf537595e70%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1bb6b0b3-c261-4f37-b0e0-3bf537595e70%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:23am UTC](https://discuss.elastic.co/t/docvalues-overhead-in-es/22897/4 "2017-07-06T00:23:47Z")

</div>


