Skip to content

Elastic uses depricated option UseConcMarkSweepGC #36828

Closed

Description

@ialidzhikov

Describe the feature:
A gc deprication warning is being shown.

Elasticsearch version (bin/elasticsearch --version):
6.5.1

Plugins installed: []

JVM version (java -version):

[root@elasticsearch-logging-0 elasticsearch]# /opt/jdk-11.0.1/bin/java -version
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)

OS version (uname -a if on a Unix-like system):

[root@elasticsearch-logging-0 elasticsearch]# uname -a
Linux elasticsearch-logging-0 4.14.67-coreos #1 SMP Mon Sep 10 23:14:26 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Description of the problem including expected versus actual behavior:
We see the current log:

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

Steps to reproduce:

Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc. The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.

Provide logs (if relevant):

Activity

  1. dliappis commented on Dec 19, 2018

    @dliappis
    Contributor

    Hi @ialidzhikov ,

    Since #33685, we optionally support G1GC for Java 10 and above.

    However, our default GC engine remains CMS, as Java 1.8 remains a supported runtime and we don't feel confident about supporting G1GC in Java 1.8.

    If you wish to stick to G1GC you will need to edit the jvm.options file and uncomment out this section there. You'll still see deprecation warnings (even though G1 will be used) because we enable and disable CMS options in the command line, but if you want to be completely warning-free, then you can just comment out the CMS lines and uncomment out the specific G1GC ones.

  2. elasticmachine commented on Dec 19, 2018

    @elasticmachine
    Collaborator

    Pinging @elastic/es-core-infra

  3. self-assigned this
    on Dec 19, 2018
  4. dliappis commented on Dec 19, 2018

    @dliappis
    Contributor

    I will close this issue now, I hope my above reply was helpful, if not, feel free to re-open. Thank you.

  5. ialidzhikov commented on Dec 19, 2018

    @ialidzhikov
    Author

    Thank you @dliappis . It was very helpful. Most probably we will test also G1GC.

  6. waldemarnt commented on Jul 20, 2019

    @waldemarnt

    Just one update, I was having this issue with minikube and managed to solve just increasing the default memory(2GB) of the VM to 6GBB

  7. fernandovictor013 commented on Feb 27, 2020

    @fernandovictor013

    27 Feb 2019

    I made modifications to my jmv file but the following error appeared.

    C:\Users\fernando.mota\OneDrive - BHS\Área de Trabalho\Elastic.co\elastic 7.6\logstash-7.6.0>bin\logstash -e 'input { stdin { } } output { stdout {} }'
    Unrecognized option: -
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.

    C:\Users\fernando.mota\OneDrive - BHS\Área de Trabalho\Elastic.co\elastic 7.6\logstash-7.6.0>java -version
    java version "1.8.0_241"
    Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
    Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)

  8. cawoodm commented on May 29, 2020

    @cawoodm
    Contributor

    Still getting these warnings on Elastic 7.7. Now that we're "all" on OpenJDK 14 - should we be commenting out these lines?

    jvm.options

    -XX:+UseConcMarkSweepGC
    -XX:CMSInitiatingOccupancyFraction=75
    -XX:+UseCMSInitiatingOccupancyOnly
    
  9. dliappis commented on May 29, 2020

    @dliappis
    Contributor

    @cawoodm The jvm.options in 7.7 looks like:

    ## 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
    14-:-XX:G1ReservePercent=25
    14-:-XX:InitiatingHeapOccupancyPercent=30

    So the deprecation warnings should only appear if an older java is used. If you are using the default jvm.options ^^ and the bundled jvm and it's still an issue, could we move this discussion to https://discuss.elastic.co/c/elasticsearch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions