You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move all parent/child queries (has_child, has_parent, top_children) from id cache to field data. This has a number of advantages:
Parent/child memory footprint will get reduced by using field data, compared to what it now takes with id cache. The id cache use concrete object arrays to store the parent ids which is wasteful in terms of memory usage compared the field data which uses native byte arrays to store the parent ids (via Lucene's PagedBytes). Initial benchmarks have shown that the memory usage can be reduced up to half with parent/child using field data.
Parent child can use paged data structures because field data uses paged data structures under the hood as well. This will result in a better stability because on the jvm level, because of less garbage collection, which boils down to the fact that the storage behind paged data structures is reused between requests and paged data structures taking less memory in general compared to the concrete object arrays in id cache.
By reusing the field data parent/child can reuse its infrastructure For example using the CircuitBreaker to fail search requests if too much memory is being spent on parent/child rather then going out of memory.
The id cache is similar to field data in a sense that represents field values into memory by removing the id cache a lot of duplicate logic / code will be removed.
These advantages come at a cost of a small performance loss of up to 10% in query time execution, but the advantages outweigh the performance loss in terms of stability, predictability (less sudden gc collections) and less memory usage.
The id cache can be removed, since nothing inside ES is using it. For backward compatibility reason in 1.x releases the id cache statistics will be reported as was before, but it will be based on the _parent field in field data and the _parent field will not be reported in field data statistics.
The text was updated successfully, but these errors were encountered:
Move all parent/child queries (has_child, has_parent, top_children) from id cache to field data. This has a number of advantages:
These advantages come at a cost of a small performance loss of up to 10% in query time execution, but the advantages outweigh the performance loss in terms of stability, predictability (less sudden gc collections) and less memory usage.
The id cache can be removed, since nothing inside ES is using it. For backward compatibility reason in 1.x releases the id cache statistics will be reported as was before, but it will be based on the
_parent
field in field data and the_parent
field will not be reported in field data statistics.The text was updated successfully, but these errors were encountered: