At a glance
OpenJDK Wiki states that ZGC is:
Concurrent Region-based Compacting NUMA-aware Using colored pointers Using load barriers
At its core, ZGC is a concurrent garbage collector, meaning all heavy lifting work is done while Java threads continue to execute. This greatly limits the impact garbage collection will have on your application’s response time.
ZGC is currently only available on Linux/x64, if you with to test it in other platforms you might use a VM or Docker, also JDK 11, JDK 12 or JDK 13 Early Access are needed.
My setup includes:
Please note that ZGC is available only on HotSpot JVM, OpenJ9 JVM come with different GCs.
Download and install OpenJDK and Eclipse IDE, you can simply unpack the archives in you home directory, take note of installation paths.
eclipse.ini configuration file in your Eclipse installation directory.
-vm option following these instructions, you may end up with something like:
Change the line containing
You may also change the heap size parameters
Xmx to higher values, personally I have quadrupled the values, more on this here.
The result should look like:
-vm /opt/java/jdk-11.0.3/bin/java -startup plugins/org.eclipse.equinox.launcher_1.5.300.v20190213-1655.jar --launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1000.v20190125-2016 -product org.eclipse.epp.package.jee.product -showsplash org.eclipse.epp.package.common --launcher.defaultAction openFile --launcher.defaultAction openFile --launcher.appendVmargs -vmargs -Dosgi.requiredJavaVersion=1.8 [email protected]/eclipse-workspace -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:+UseStringDeduplication --add-modules=ALL-SYSTEM -Dosgi.requiredJavaVersion=1.8 -Dosgi.dataAreaRequiresExplicitInit=true -Xms1024m -Xmx4096m --add-modules=ALL-SYSTEM
Now you can run Eclipse IDE and enjoy it with your low-pause GC equipped JVM!