# Is circuit breaker config help to control Memory usage

**URL:** https://discuss.elastic.co/t/is-circuit-breaker-config-help-to-control-memory-usage/361125
**Category:** Elasticsearch
**Created:** [June 10, 2024, 8:48am UTC](https://discuss.elastic.co/t/is-circuit-breaker-config-help-to-control-memory-usage/361125 "2024-06-10T08:48:10Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nchalise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nchalise/32/130399_2.png) [@nchalise](https://discuss.elastic.co/u/nchalise)
#### Post date: [June 10, 2024, 8:48am UTC](https://discuss.elastic.co/t/is-circuit-breaker-config-help-to-control-memory-usage/361125/1 "2024-06-10T08:48:10Z")

</div>

Is circuit breaker configuration help to control the Memory usage? By default it is 95% but I noticed that the memory reach to 99% in some of the nodes.

Is there any other way to control the memory usage via configuration?

Thanks

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [June 10, 2024, 9:06am UTC](https://discuss.elastic.co/t/is-circuit-breaker-config-help-to-control-memory-usage/361125/2 "2024-06-10T09:06:59Z")

</div>

There's a difference between circuit breaker, RAM and JVM HEAP.  
AFAIK the circuit breaker is here to avoid you shooting in your foot.

If a request is going to consume too much heap, the circuit breaker will reject the request.

But in general, Elasticsearch and Lucene is trying to use as much RAM as possible (outside of the HEAP size). And this is mostly done by the file system cache on an OS level.

Having a high usage of the RAM is "normal" then.

Not sure if I answered your question though.

---

<div class="post-metadata">

### Author: ![nchalise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nchalise/32/130399_2.png) [@nchalise](https://discuss.elastic.co/u/nchalise)
#### Post date: [June 10, 2024, 12:11pm UTC](https://discuss.elastic.co/t/is-circuit-breaker-config-help-to-control-memory-usage/361125/3 "2024-06-10T12:11:29Z")

</div>

Thanks for response. Memory usage means JVM HEAP usage here. I mostly face JVM HEAP spike and node unresponsive. so, is circuit breaker helps here? or is there any way to set JVM HEAP usage max threshold to 90% in any situation.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [June 10, 2024, 9:45pm UTC](https://discuss.elastic.co/t/is-circuit-breaker-config-help-to-control-memory-usage/361125/4 "2024-06-10T21:45:04Z")

</div>

What is the output of:

```auto
GET /
GET /_cat/nodes?v
GET /_cat/health?v
GET /_cat/indices?v

```

If some outputs are too big, please share them on [gist.github.com](http://gist.github.com) and link them here.
