Hello,

We have a reader cache that depends on the memory usage for each reader. We
found the calculation of reader size for doc values to be under counting.

See line:
https://github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/codecs/lucene80/Lucene80DocValuesProducer.java#L69

Looks like the memory estimate is only using the shallow size of the class,
and does not include the objects stored in the maps:

https://github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/codecs/lucene80/Lucene80DocValuesProducer.java#L55

We made a local patch and saw a significant difference in reported size.

Please let us know if this is the right thing to do, we are happy to
contribute our patch.

Thanks

-John

Reply via email to