Elasticsearch indices.breaker.total.use_real_memory Setting

The indices.breaker.total.use_real_memory setting in Elasticsearch controls whether the total circuit breaker should consider real memory usage instead of only considering the memory reserved by child circuit breakers.

  • Default value: true
  • Possible values: true or false
  • Recommendation: Keep the default value unless you have specific reasons to change it

This setting determines how Elasticsearch calculates the memory usage for the total circuit breaker. When set to true, it considers the actual memory usage of the JVM. When set to false, it only considers the sum of memory reserved by child circuit breakers.

Example

To change the setting using the cluster settings API:

PUT /_cluster/settings
{
  "persistent": {
    "indices.breaker.total.use_real_memory": false
  }
}

Changing this setting to false might be considered if you want to rely solely on the child circuit breakers' estimations rather than actual memory usage. However, this can potentially lead to underestimating memory usage and increase the risk of out-of-memory errors.

Common Issues or Misuses

  • Setting this to false without understanding the implications can lead to unexpected out-of-memory errors.
  • Misinterpreting the memory usage when this setting is false, as it may not reflect the actual memory state of the cluster.

Do's and Don'ts

  • Do keep this setting at its default value (true) unless you have a specific reason to change it.
  • Do monitor your cluster's memory usage closely if you decide to set this to false.
  • Don't change this setting without thoroughly understanding its impact on your cluster's memory management.
  • Don't rely solely on circuit breaker estimations for critical memory management decisions.

Frequently Asked Questions

Q: What is the purpose of the total circuit breaker in Elasticsearch?
A: The total circuit breaker in Elasticsearch helps prevent out-of-memory errors by tracking overall memory usage and tripping when a certain threshold is reached.

Q: How does setting indices.breaker.total.use_real_memory to false affect memory management?
A: When set to false, Elasticsearch only considers the sum of memory reserved by child circuit breakers, potentially underestimating actual memory usage and increasing the risk of out-of-memory errors.

Q: Can changing this setting improve performance?
A: Changing this setting is unlikely to directly improve performance. It's primarily a safeguard against memory-related issues rather than a performance tuning parameter.

Q: How often should I review this setting?
A: You should review this setting during initial cluster setup and whenever making significant changes to your cluster's memory allocation or usage patterns.

Q: Is it safe to change this setting on a production cluster?
A: While it's possible to change this setting on a production cluster, it's not recommended without careful consideration and testing, as it can significantly impact how Elasticsearch manages memory and prevents out-of-memory situations.

Subscribe to the Pulse Newsletter

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

We use cookies to provide an optimized user experience and understand our traffic. To learn more, read our use of cookies; otherwise, please choose 'Accept Cookies' to continue using our website.