Garbage First helps boost CF2018 performance
Garbage first UseG1GC (G1) has been present for a while as an experimental option in Java 7 and released in Java 8. Java 9 and 10 offer G1 as default collector. Of interest Java 11 is due for release in September (in a few days as I write).
When CF2018 installs it sets Parallel garbage collector. Suggest folks could do well to enable some Java logging and examine log file for performance related information like how long and when memory is in full garbage collection (java reminder full GC is a stop the world interval).
JVM arguments to add logging:
-XX:+PrintGCDetails -verbose:gc -Xloggc:cfjvmGC.log
Perform one change to CF Java by either removing UseParallelGC (G1 is default so it will apply) or replace UseParallelGC with UseG1GC (sometimes it is better to read JVM arguments and know what values you are using). Perform same load and logging as before then again take notice of time spent in garbage collection.
Part of young collection is a pause however it is 100’s of milliseconds so other than being in the log is not felt by application load.
Concurrently happening with the load is marking of dead objects taking place helping to limit the time of clearing up non referenced objects from memory.
The memory foot print was smaller with G1.
For those that have applied G1 before it has a new parallel phase released in Java 10 speeding up performance (over that what you would notice for CF11 or CF2016 with Java 8) doing GC’s on multiple threads refer:
As always do your own debugging and logging to know what outcomes are being achieved.