Skip to content

Provide JDK 11 with ZGC enabled #233

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

Closed
josepowera opened this issue Sep 24, 2018 · 13 comments
Closed

Provide JDK 11 with ZGC enabled #233

josepowera opened this issue Sep 24, 2018 · 13 comments
Labels
Request Request for image modification or feature

Comments

@josepowera
Copy link

josepowera commented Sep 24, 2018

Java 11 is shipping with low latency Garbage collector.. However starting docker image from openjdk seems to have this feature missing:

docker run --rm -it openjdk:11-ea-slim java -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -version
Error occurred during initialization of VM
Option -XX:+UseZGC not supported

This option is architecture specific - only available for Linux/x64.

It could also be upstream issue - debian packacing issue? Probably same problem as seen in https://twitter.com/shipilev/status/1039180042260111360

https://src.fedoraproject.org/rpms/java-11-openjdk/c/915d59aa585cfbb210d74ebf9e717c2eddb7d93c?branch=master

@wglambert wglambert added the Request Request for image modification or feature label Sep 24, 2018
@tianon
Copy link
Member

tianon commented Sep 25, 2018

It could also be upstream issue - debian packacing issue?

Unfortunately, yes exactly this. We don't build OpenJDK from source (for various reasons), so this will need to be reported on the Debian openjdk-11 package instead.

It could also be a quirk of -slim (which embeds the Debian "headless" packages); have you also tried with the non--slim images to verify that it's indeed an issue with all of src:openjdk-11 and not simply something that gets excluded for the smaller "headless" packages?

@josepowera
Copy link
Author

Same in non slim:

docker run --rm -it openjdk:11-ea java -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -version
Error occurred during initialization of VM
Option -XX:+UseZGC not supported

@josepowera
Copy link
Author

@robilad
Copy link

robilad commented Sep 26, 2018

ZGC is an experimental JVM feature, so it needs to be enabled during the configuration of the build from OpenJDK source code. It is built in with the Oracle OpenJDK builds - see #235 for status, and should be available in Debian builds soon.

@rbjorklin
Copy link

It seems this has been fixed upstream, how/when is a rebuild triggered?

$ docker run --rm debian:sid /bin/bash -c 'apt-get update && apt-get install -y openjdk-11-jdk && java -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -version'

...
openjdk version "11" 2018-09-25   
OpenJDK Runtime Environment (build 11+28-Debian-2)
OpenJDK 64-Bit Server VM (build 11+28-Debian-2, mixed mode)

@yosifkit
Copy link
Member

The automatic update.sh caught it already in 11ac138. We just need to update https://github.com/docker-library/official-images with a PR (we'll probably do so tomorrow morning).

@rbjorklin
Copy link

rbjorklin commented Sep 28, 2018

Sounds good @yosifkit! Since JDK 11 is no longer in EA maybe the update.sh script should be updated a bit? I've identified the following lines but there might be more:

https://github.com/docker-library/openjdk/blob/master/update.sh#L191-L197
https://github.com/docker-library/openjdk/blob/master/update.sh#L396
https://github.com/docker-library/openjdk/blob/master/update.sh#L409-L421
https://github.com/docker-library/openjdk/blob/master/update.sh#L443-L446

@yosifkit
Copy link
Member

Already done: bca955f

And should be building shortly with the merge in official images: docker-library/official-images#4892.

@cedws
Copy link

cedws commented Sep 30, 2018

Sorry to derail, but would anyone happen to know the status of ZGC on Windows? I have the latest release from http://jdk.java.net/11/ but get the same message as above. Thanks.

@rbjorklin
Copy link

I think ZGC only has experimental support under Linux on x86_64 so far.

@cedws
Copy link

cedws commented Sep 30, 2018

@rbjorklin Ah that's a shame, I will wait and see what happens then. Thanks for your swift response 👍.

@rbjorklin
Copy link

@c-edw you might still be interested in trying JDK11, there has been some significant tweaking on the G1GC: http://mail.openjdk.java.net/pipermail/hotspot-gc-use/2018-June/002759.html

@robilad
Copy link

robilad commented Oct 1, 2018

ZGC has been ported to SPARC/Solaris, and there is work being done by Linaro on an AArch64/Linux port. There is no Windows port yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request Request for image modification or feature
Projects
None yet
Development

No branches or pull requests

7 participants