Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elastic uses depricated option UseConcMarkSweepGC #36828

Closed
ialidzhikov opened this issue Dec 19, 2018 · 9 comments
Closed

Elastic uses depricated option UseConcMarkSweepGC #36828

ialidzhikov opened this issue Dec 19, 2018 · 9 comments

Comments

@ialidzhikov
Copy link

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):

@dliappis
Copy link
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.

@dliappis dliappis added >non-issue :Core/Infra/Core Core issues without another label labels Dec 19, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@dliappis dliappis self-assigned this Dec 19, 2018
@dliappis
Copy link
Contributor

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

@ialidzhikov
Copy link
Author

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

@waldemarnt
Copy link

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

@fernandovictor013
Copy link

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)

@cawoodm
Copy link
Contributor

cawoodm commented May 29, 2020

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

@dliappis
Copy link
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?

@cawoodm
Copy link
Contributor

cawoodm commented Jun 2, 2020

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

No branches or pull requests

7 participants