Reading up on G1GC in forum posts, I've gathered:
Clients
- Add
jvm-args="-XX:+UseG1GC"
to the end of the target string in the native client launcher shortcuts to use G1GC under Java 7 (from this post by @pturmel). On the other hand, I'm thinking this is not required as long as clients are running on Java 8+. See next point. - Consider limiting Java versions to 8+ in gateway settings as G1GC is the default in Java 8 per this post by @pturmell. Also note G1GC is not fully supported prior to JDK7 release 4.
Are there any other requirements/gotchas for the client end of things?
Gateway
From this post by @kathyapplebaum, it looks like starting with Ignition 7.9.8, G1GC is the default for Java 8+. That's great! However, it appears upgrading to 7.9.8 doesn't do the trick; an installation commissioned last year with an earlier version and then upgraded to 7.9.8 still shows CMS garbage collection in ignition.conf despite the fact ignition.conf on this machine is as installed (not edited):
# Java Additional Parameters
wrapper.java.additional.1=-XX:PermSize=64m
wrapper.java.additional.2=-XX:MaxPermSize=128m
wrapper.java.additional.3=-XX:+UseConcMarkSweepGC
wrapper.java.additional.4=-XX:+CMSClassUnloadingEnabled
#wrapper.java.additional.5=-XX:+CMSPermGenSweepingEnabled
wrapper.java.additional.6=-Ddata.dir=data
wrapper.java.additional.7=-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
#wrapper.java.additional.8=-Xdebug
#wrapper.java.additional.9=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
# Initial Java Heap Size (in MB)
wrapper.java.initmemory=256
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=1024
Based on this post by @pturmel, I'm thinking we'd edit our ignition.conf file shown above something like this to enable G1GC running on Java 7:
# Java Additional Parameters
wrapper.java.additional.1=-XX:+UseG1GC
wrapper.java.additional.2=-XX:MaxGCPauseMillis=100
wrapper.java.additional.3=-Ddata.dir=data
wrapper.java.additional.4=-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
# Initial Java Heap Size (in MB)
wrapper.java.initmemory=256
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=1024
Coming back to quote below, it seems we shouldn't need the UseG1GC option if gateway is running on Java 8 as G1GC is the default in Java 8:
So ignition.conf could be reduced to the below for gateways running on Java 8:
# Java Additional Parameters
wrapper.java.additional.1=-XX:MaxGCPauseMillis=100
wrapper.java.additional.2=-Ddata.dir=data
wrapper.java.additional.3=-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
# Initial Java Heap Size (in MB)
wrapper.java.initmemory=256
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=1024
Is the above on the right track? Anything else to consider/do to make the change to G1GC?