elasticsearch cache configuration

The cache
index has different built-in cache modules. They include filters, fields and others.
Filter Cache
The filter cache is responsible for caching filtered results (used in queries). The default implementation of the filter cache (and a recommended use in almost all cases) is the node filter cache type.
Node Filter Cache
The node filter cache can be configured to use a percentage of the total memory allocated to the process or a specified amount of memory. All index shards can only appear on a node sharing a single node cache (that's why it's called "node"). This cache implements a policy called LRU data deletion: when the cache is full, the least recently used Data is deleted to make room for new data to be stored.
This setting allows to control how much memory the filter cache occupies, indices.cache.filter.size , the default value of this property is 20%. Note that this is not an index level , but a node-level setting (which can be configured on the node). indices.cache.filter.size can accept a percentage value, such as: 30%, or an exact value, such as: 512
mb. The

index filter caches
this The filter cache is at the index level (on each node). In general, it is not recommended to use this cache because the cache memory usage depends on the shards on each node, which is difficult to predict. This type of For: resident, soft and weak.
All types support the following settings:
Setting
Description
index.cache.filter.max_size
This is the maximum size (count, not byte size) to set the cache (cache per shard per query). The default is not set (-1), generally used for soft cache or filter suitable for cache.
index.cache.filter.expire
sets how long cached data is inactive before it expires.
The default value is (-1). For example, it can be set to 5m, which means that the cached data expires after 5 minutes.
Field data cache
Field data cache is mainly used when sorting or faceting by a certain field. It loads the values ​​of all fields into memory in order to provide fast access to these values. Field data caching can be expensive for a field, so it is recommended to have enough memory to allocate it and make it load.
By default the cache type is resident (because the rebuild code is too large). Other types can use soft.
Setting
Description
index.cache.field.max_size
This is the maximum size (count, not byte size) for setting the cache (cache in a shard per query). The default is not set (-1)
index.cache.field.expire
sets how long cached data is inactive to expire.
The default value is (-1). For example, it can be set to 5m, which means that the cached data expires after 5 minutes.

—————————————————————————————————————————————–
English original text:
Cache

There are different caching inner modules associated with an index. They include filter,field and others.
Filter Cache
The filter cache is responsible for caching the results of filters (used in the query). The default implementation of a filter cache (and the one recommended
to use in almost all cases) is the node filter cache type.

Node Filter Cache
The node filter cache may be configured to use either a percentage of the total memory allocated to the process or an specific amount of memory. All shards
present on a node share a single node cache (thats why its called node`). The cache implements an LRUeviction policy: when a cache becomes full, the least recently used data is evicted to make way for new data.

The setting that allows one to control the memory size for the filter cache isindices.cache.filter.size, which defaults to 20%. Note, this is not an index
level setting but a node level setting (can be configured in the node configuration).

indices.cache.filter.size can accept either a percentage value, like 30%, or an exact value, like 512mb.
Index Filter Cache
A filter cache that exists on the index level (on each node). Generally, not recommended for use since its memory usage depends on which shards are allocated
on each node and its hard to predict it. The types are: resident, soft and weak.

All types support the following settings:



Setting
Description
index.cache.filter.max_size

The max size (count, not byte size) of the cache (per search segment in a shard). Defaults to not set (-1), which is usually fine with soft cache and
proper cacheable filters.



index.cache.filter.expire
A time based setting that expires filters after a certain time of inactivity. Defaults to -1. For example, can be set to 5m for a 5 minute expiry.

Field Data Cache
The field data cache is used mainly when sorting on or faceting on a field. It loads all the field values to memory in order to provide fast document based
access to those values. The field data cache can be expensive to build for a field, so its recommended to have enough memory to allocate it, and keep it loaded.

The default type for the field data cache is resident (because of the cost of rebuilding it). Other types include soft.

Setting
Description

index.cache.field.max_size
The max size (count, not byte size) of the cache (per search segment in a shard). Defaults to not set (-1).

index.cache.field.expire
A time based setting that expires filters after a certain time of inactivity. Defaults to -1. For example, can be set to 5m for a 5 minute expiry

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326262574&siteId=291194637