05-doc-values-es Control Aggregation Memory Usage-elasticsearch authoritative guide translation

Source: Internet
Author: User
Tags garbage collection memory usage

Doc values in memory are constrained by the heap, and horizontal scaling can solve this problem in some cases, but you will find that even after you expand the node, the heavy agg will spend your heap space when the other nodes are not fully utilized.

The default fielddata is written to memory, but this is not the only option, it can be written to the hard disk, and it can achieve the same functionality, but not in-memory fielddata but docvalue on the hard disk.

Doc value was added to the 1.0 until recently, Doc value became slow, and in many ways ES and Lucene had solved the bottleneck problem.

Now Doc value is 10%-25% slower than Fielddata, mainly from two factors:

Doc value exists on the hard disk, but this allows the execution of large enough data while allowing the es_heap_size to be small to improve garbage collection and system stability.

Doc values are created at index time, not when search is created, and Fielddata is created when the query is inverted, which improves the efficiency of doc values.

The data exchange between the memory and the hard disk will also slightly slow down the Fielddata, and doc value is unusually efficient, so for many queries you don't even feel a slight slowdown while speeding up garbage collection and raising the initial time may be earned.

This makes full use of the filesystem cache if the data is resident filesystem cache, which is equivalent to ram


Enabling DOC Values

Doc values can be used in addition to the analyzed field, and the settings are field-level, so you can use Fielddata with doc value.

Put/music/_mapping/song

{

"Properties": {

"Tag": {

' Type ': ' String ',

"Index": "Not_analyzed",

"Doc_values": True

}

}

}



In the future, Doc value will become the default value.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.