Skip to content

Instantly share code, notes, and snippets.

@phase
Last active May 11, 2019 01:26
Show Gist options
  • Save phase/e6f3a381e923a86551408caff738d158 to your computer and use it in GitHub Desktop.
Save phase/e6f3a381e923a86551408caff738d158 to your computer and use it in GitHub Desktop.
Downloads RedHat's fork of JDK11 with the Shenandoah GC
mkdir -p /usr/lib/java-sgc/
cd /usr/lib/java-sgc/
PWD=$(pwd)
curl https://builds.shipilev.net/openjdk-shenandoah-jdk11/openjdk-shenandoah-jdk11-latest-linux-x86_64-release.tar.xz -o shenandoah.tar.xz
tar xvf ./shenandoah.tar.xz
${PWD}/jdk/bin/java -XX:+UseShenandoahGC -Xlog:gc -version
ln -s ${PWD}/jdk/bin/java /usr/bin/java-sgc
@phase
Copy link
Author

phase commented May 10, 2019

Go to the directory you want to install Shenandoah & run:

curl "https://gist.githubusercontent.com/phase/e6f3a381e923a86551408caff738d158/raw/41a5d0d20b0b48958ebd3c89085b1b38767fcf23/download-shenandoah.sh" | bash

and then run java-sgc with the -XX:+UseShenandoahGC flag. You can test it with this:

java-sgc -XX:+UseShenandoahGC -Xlog:gc -version

Note from Roman Kennke:

Degrading performance due to class unloading can be addressed by -XX:+ClassUnloadingWithConcurrentMark. We're working on concurrent class unloading and weak reference processing right now.

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