# How to change GC from CMS to G1?

**URL:** https://discuss.elastic.co/t/how-to-change-gc-from-cms-to-g1/126340
**Category:** Elasticsearch
**Created:** [March 31, 2018, 9:31pm UTC](https://discuss.elastic.co/t/how-to-change-gc-from-cms-to-g1/126340 "2018-03-31T21:31:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![KeithTt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keithtt/32/29447_2.png) [@KeithTt](https://discuss.elastic.co/u/KeithTt)
#### Post date: [March 31, 2018, 9:31pm UTC](https://discuss.elastic.co/t/how-to-change-gc-from-cms-to-g1/126340/1 "2018-03-31T21:31:18Z")

</div>

Which directives need to be changed...

I just found this page in the official guide: [https://www.elastic.co/guide/en/elasticsearch/reference/current/\_g1gc\_check.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/_g1gc_check.html)

---

<div class="post-metadata">

### Author: ![Tim\_Heckel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tim_heckel/32/1039_2.png) [@Tim\_Heckel](https://discuss.elastic.co/u/Tim_Heckel)
#### Post date: [April 1, 2018, 2:45am UTC](https://discuss.elastic.co/t/how-to-change-gc-from-cms-to-g1/126340/2 "2018-04-01T02:45:31Z")

</div>

I would also love to get this information. Specifically, what needs to change in the elasticsearch.yml file. Noted here, sematext has apparently been running the G1 garbage collector for "years" without incident:

> **[Java 9 Elasticsearch Benchmark: upgrading benefits](https://sematext.com/blog/java-9-elasticsearch-benchmark/)**
>
> How Does Java 9 Work with Elasticsearch 6? It works well, but don’t expect miracles. Unless you’re using G1, then there are some miracles.

---

<div class="post-metadata">

### Author: ![KeithTt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keithtt/32/29447_2.png) [@KeithTt](https://discuss.elastic.co/u/KeithTt)
#### Post date: [April 1, 2018, 10:08am UTC](https://discuss.elastic.co/t/how-to-change-gc-from-cms-to-g1/126340/3 "2018-04-01T10:08:39Z")

</div>

Thank you very much for ur reply, it is a good article.

But I do not find how to modify the config...😭

---

<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: [April 29, 2018, 10:08am UTC](https://discuss.elastic.co/t/how-to-change-gc-from-cms-to-g1/126340/4 "2018-04-29T10:08:46Z")

</div>

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