# \[ES v2.3\] jvm keep gc with no index and query, slow down whole cluster

**URL:** <https://discuss.elastic.co/t/es-v2-3-jvm-keep-gc-with-no-index-and-query-slow-down-whole-cluster/114444>\
**Category:** Elasticsearch\
**Created:** [January 8, 2018, 3:06am UTC](https://discuss.elastic.co/t/es-v2-3-jvm-keep-gc-with-no-index-and-query-slow-down-whole-cluster/114444 "2018-01-08T03:06:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yu\_Han](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yu_han/32/26315_2.png) [@Yu\_Han](https://discuss.elastic.co/u/Yu_Han)\
**Post date:** [January 8, 2018, 3:06am UTC](https://discuss.elastic.co/t/es-v2-3-jvm-keep-gc-with-no-index-and-query-slow-down-whole-cluster/114444/1 "2018-01-08T03:06:34Z")

</div>

we have a huge cluster. 5 nodes.  
about 15000000000 documents  
and 15000 shards.

jvm:  
ES\_JAVA\_OPTS="-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=100 -XX:GCLogFileSize=10M -XX:+CMSIncrementalMode -XX:+CMSScavengeBeforeRemark -XX:+ParallelRefProcEnabled -XX:NewSize=5G -XX:MaxTenuringThreshold=15 -XX:SurvivorRatio=20 -XX:CMSInitiatingOccupancyFraction=50 -XX:+UseCMSInitiatingOccupancyOnly"

it keeps gc, looks like figure below

 ![48 AM](https://us1.discourse-cdn.com/elastic/original/3X/1/b/1bfc101794e196935335647455bfc8613380fffa.png)

after delete half data, reduce both shards count and ducuments size. it becomes health.  
I am querying what is the root cause? is there any limit for shards count or index size on a node.

what metadata maintained in memory, cause occupy huge memory when cluster goes huge.

---

<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:** [January 8, 2018, 3:23am UTC](https://discuss.elastic.co/t/es-v2-3-jvm-keep-gc-with-no-index-and-query-slow-down-whole-cluster/114444/2 "2018-01-08T03:23:17Z")

</div>

Please don't post images of text as they are hardly readable and not searchable.

Instead paste the text and format it with `</>` icon. Check the preview window.

Too many shards per node seems to me one of the good reasons. Then it can be caused by fielddata as well. Depends on your mapping and if you are using doc values or not.

Also, you should upgrade.

But the first thing to do is to reduce the number of shards per node.

Have a look at

> **[How many shards should I have in my Elasticsearch cluster?
	  	 | Elastic](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster)**
>
> Elasticsearch is a very versatile platform, that supports a variety of use cases, and provides great flexibility around data organisation and replication strategies. This flexibility can however somet...

> **[NetSecureDay: Managing your Black Friday Logs](https://speakerdeck.com/elastic/netsecureday-managing-your-black-friday-logs)**
>
> Surveiller une application complexe n’est pas une tâche aisée, mais avec les bons outils, ce n’est pas si sorcier. Néanmoins, des périodes fortes telles que les opérations de type « Black Friday » (Vendredi noir) ou période de Noël peuvent pousser...

---

<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:** [February 5, 2018, 3:23am UTC](https://discuss.elastic.co/t/es-v2-3-jvm-keep-gc-with-no-index-and-query-slow-down-whole-cluster/114444/3 "2018-02-05T03:23:26Z")

</div>

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