-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Proposal for a Dockerfile for OpenJ9 #884
Comments
I think it would be great to have an OpenJ9 image along with the images we currently ship. If somebody sends a pull request, I will be happy to help it to get integrated CC @jenkinsci/sig-platform . |
hi, i've been working on this issue in this pull request "Proposal for a Dockerfile for OpenJ9" |
#889 FTR |
@oleg-nenashev I've also created a pull request on this issue |
@dsouzai Just tried OpenJ9 myself, and I am blown away at the speed it starts up! This is really cool, hoping for the PR to go through soon! |
@dsouzai Why are these to packages needed? I know they are needed for Jenkins to come on run, but is it because the AdoptOpenJDK base images are from Ubuntu not Debian? |
The |
both |
@dsouzai @MarkEWaite Thanks for the responses. That's what I am looking for! Interesting they are not in the AdoptOpenJDK images. Or maybe its interesting that they are including in OpenJDKs? 😕 |
@james-crowley many images include more tools than are strictly required. Some images are even based on the wrong operating system version. For example, there was an extended time (weeks and possibly months) when the OpenJDK 11 official image was based on Debian unstable ("sid"). It surprised me that they would base an official OpenJDK image on an operating system that the provider declares is unstable. Thankfully, that is no longer the case. |
@MarkEWaite That is some useful information. What tag was the unstable version released under for OpenJDK? Did it make it into any of the builds of Jenkins? Odd this was not caught before It made its way in the official Docker Library. |
It was during the period around the release of OpenJDK 11. OpenJDK 11 was released Sep 25, 2018. Issue 237 was opened Oct 5, 2018 reporting that official OpenJDK 11 docker image was based on Debian unstable ("sid") . Pull request 259 was applied Dec 24, 2018 to switch from unstable to stable. I'm not sure there is really anything to do about it. OpenJDK 11 development was in a very busy time at that point. |
I'm opening this issue as a precursor to a future PR based on this thread in the mailing list [1].
For background, I had done an experiment [2] to compare Jenkins startup and footprint in Docker using both Hotspot and OpenJ9 [3]; with a primed
-Xshareclasses
option, I found a ~35% improvement in startup time and a ~80% improvement in footprint when using OpenJ9. The takeaway from the email thread was that the community is open to adding a new Docker file for OpenJ9. As such, this issue is mainly to track what might be involved for this endeavour since we don't have a PR available (I'm going on vacation, so this way someone else on our side can hopefully pick this up in the mean time); it also means that we can start having the technical discussions with the Jenkins community.As far as I can tell, what would be involved would be:
openjdk:8-jdk-stretch
toadoptopenjdk/openjdk8-openj9:latest
; currently there's some issues with the latest OpenJ9 release (0.15.1 on Java 8; nightlies are fine), so this would have to wait until 0.17.gpg fontconfig
to the set of toolsapt-get
has to installOPENJ9_JAVA_OPTIONS="-Xshareclasses -Xscmx80M"
tojenkins.sh
; more details on-Xshareclasses
available here [4]OPENJ9_JAVA_OPTIONS
to beOPENJ9_JAVA_OPTIONS="-Xshareclasses,readonly -Xscmx80M
. However, I'm not 100% sure about this: one the one hand, if thereadonly
flag doesn't exist, then if a new layer is added to the image and the JVM stores more data to the SCC, it will duplicate the SCC in the new layer which will increase on-disk image size; on the other hand, if the user sets up their Jenkins instance by installing plugins and what not, it will result in actually useful Java classes + AOT code added to the SCC which will be beneficial when they commit that new layer and start containers off of that. [5] is meant to address this so perhaps if the next OpenJ9 release has this feature, this point becomes moot.[1] https://groups.google.com/forum/#!topic/jenkinsci-dev/Lr651X0eCgA
[2] https://blog.openj9.org/2019/09/17/comparing-jenkins-startup-in-docker/
[3] https://github.com/eclipse/openj9
[4] https://www.eclipse.org/openj9/docs/xshareclasses/
[5] eclipse-openj9/openj9#5480
The text was updated successfully, but these errors were encountered: