Elasticsearch indices.breaker.fielddata.overhead Setting

Pulse - Elasticsearch Operations Done Right

On this page

Description Example Common Issues and Misuses Do's and Don'ts Frequently Asked Questions

The indices.breaker.fielddata.overhead setting in Elasticsearch controls the overhead factor for the fielddata circuit breaker. This setting helps prevent out-of-memory errors by estimating the memory usage of fielddata and limiting its allocation.

Description

  • Default value: 1.03 (103% of the actual memory usage)
  • Possible values: Any positive floating-point number
  • Recommendation: Keep the default value unless you have specific memory requirements or issues

The fielddata circuit breaker estimates the memory usage of fielddata before loading it into memory. The indices.breaker.fielddata.overhead setting adds an overhead to this estimation to account for any potential underestimation. By default, it adds a 3% overhead to the estimated memory usage.

Example

To change the fielddata circuit breaker overhead using the cluster settings API:

PUT /_cluster/settings
{
  "persistent": {
    "indices.breaker.fielddata.overhead": 1.05
  }
}

This example increases the overhead to 5%. You might want to increase this value if you notice that the actual memory usage of fielddata consistently exceeds the estimated usage, potentially leading to out-of-memory errors.

Common Issues and Misuses

  • Setting the value too low may lead to underestimation of memory usage, potentially causing out-of-memory errors.
  • Setting the value too high may unnecessarily limit the amount of fielddata that can be loaded, potentially impacting query performance.

Do's and Don'ts

  • Do monitor your cluster's memory usage and adjust this setting if you consistently see out-of-memory errors related to fielddata.
  • Do consider adjusting this setting in conjunction with other fielddata circuit breaker settings for optimal performance.
  • Don't set this value arbitrarily without understanding your cluster's memory usage patterns.
  • Don't use this setting as a primary means of managing memory; instead, focus on optimizing your queries and data model.

Frequently Asked Questions

Q: How does the fielddata circuit breaker work?
A: The fielddata circuit breaker estimates the memory usage of fielddata before loading it into memory. If the estimated usage exceeds a certain threshold, it prevents the fielddata from being loaded to avoid out-of-memory errors.

Q: Why might I need to adjust the indices.breaker.fielddata.overhead setting?
A: You might need to adjust this setting if you notice that the actual memory usage of fielddata consistently exceeds or falls short of the estimated usage, leading to either out-of-memory errors or underutilization of available memory.

Q: How can I monitor the effectiveness of the fielddata circuit breaker?
A: You can use Elasticsearch's stats API to monitor circuit breaker statistics, including tripped count and estimated and actual memory usage.

Q: What other settings are related to the fielddata circuit breaker?
A: Other related settings include indices.breaker.fielddata.limit, which sets the maximum memory for fielddata, and indices.breaker.total.limit, which sets the maximum memory for all circuit breakers combined.

Q: Can changing this setting impact query performance?
A: Yes, setting the overhead too high might unnecessarily limit the amount of fielddata that can be loaded, potentially impacting query performance. Conversely, setting it too low might lead to out-of-memory errors, which would also affect performance.

Subscribe to the Pulse Newsletter

Get early access to new Pulse features, insightful blogs & exclusive events , webinars, and workshops.