# Search.max\_buckets and JVM memory pressure

**URL:** <https://discuss.elastic.co/t/search-max-buckets-and-jvm-memory-pressure/208467>\
**Category:** Elasticsearch\
**Created:** [November 19, 2019, 9:28am UTC](https://discuss.elastic.co/t/search-max-buckets-and-jvm-memory-pressure/208467 "2019-11-19T09:28:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![klaus82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/klaus82/32/45900_2.png) [@klaus82](https://discuss.elastic.co/u/klaus82)\
**Post date:** [November 19, 2019, 9:28am UTC](https://discuss.elastic.co/t/search-max-buckets-and-jvm-memory-pressure/208467/1 "2019-11-19T09:28:37Z")

</div>

I'm using Elastic 7.1.0 cluster on Elastic Cloud with 2 zones and GCP.DATA.HIGHIO.1 with 16 GB RAM.  
I set the search.max\_buckets at 1000000 and after an aggregation with search.max\_buckets overflow error, I noticed ad increase of the JVM memory pressure, from 50% (more or less) to 75%.  
Then I increased the search.max\_buckets to 2500000, now I don't have the earch.max\_buckets overflow error anymore and the JVM memory pressure remain stable about 50% during the query.  
Can someone explain to me this behavior? I don't understand why the JVM memory pressure remain stable.  
Another question, is it safe to increase the search.max\_buckets so much?  
thanks for any kind of help.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 17, 2019, 9:28am UTC](https://discuss.elastic.co/t/search-max-buckets-and-jvm-memory-pressure/208467/2 "2019-12-17T09:28:37Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
