# VM Warnings UseConcMarkSweepGC

**URL:** <https://discuss.elastic.co/t/vm-warnings-useconcmarksweepgc/235284>\
**Category:** Elasticsearch\
**Created:** [June 2, 2020, 7:06am UTC](https://discuss.elastic.co/t/vm-warnings-useconcmarksweepgc/235284 "2020-06-02T07:06:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cawoodm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cawoodm/32/14083_2.png) [@cawoodm](https://discuss.elastic.co/u/cawoodm)\
**Post date:** [June 2, 2020, 7:06am UTC](https://discuss.elastic.co/t/vm-warnings-useconcmarksweepgc/235284/1 "2020-06-02T07:06:40Z")

</div>

- Elasticsearch 7.7 on Windows Server
- `JAVA_HOME=path\to\elasticsearch\jdk`
  - `openjdk version "14" 2020-03-17`
  - `OpenJDK Runtime Environment AdoptOpenJDK (build 14+36)`
  - `OpenJDK 64-Bit Server VM AdoptOpenJDK (build 14+36, mixed mode, sharing)`

## elasticsearch.yml

```auto
## GC configuration
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75
-XX:+UseCMSInitiatingOccupancyOnly

```

As discussed [here](https://github.com/elastic/elasticsearch/issues/36828#issuecomment-636054352) we were seeing warnings on stderr about:

> OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

Changing settings as suggested to:

## jvm.options

```auto
## GC configuration 
8-13:-XX:+UseConcMarkSweepGC 
8-13:-XX:CMSInitiatingOccupancyFraction=75 
8-13:-XX:+UseCMSInitiatingOccupancyOnly 

## G1GC Configuration 
# NOTE: G1 GC is only supported on JDK version 10 or later 
# to use G1GC, uncomment the next two lines and update the version on the 
# following three lines to your version of the JDK 
# 10-13:-XX:-UseConcMarkSweepGC 
# 10-13:-XX:-UseCMSInitiatingOccupancyOnly 
14-:-XX:+UseG1GC 

```

We get lots of errors:

> Unrecognized VM option 'UseG1GC '  
> Did you mean '(+/-)UseG1GC'? Error: Could not create the Java Virtual Machine.

The only solution was to go back to the old config and comment out:

```auto
## GC configuration
#-XX:+UseConcMarkSweepGC
#-XX:CMSInitiatingOccupancyFraction=75
#-XX:+UseCMSInitiatingOccupancyOnly

```

---

<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:** [June 30, 2020, 7:06am UTC](https://discuss.elastic.co/t/vm-warnings-useconcmarksweepgc/235284/2 "2020-06-30T07:06:43Z")

</div>

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