Having a quick look at how the same application behaves under Java 8 and Java 11 we can see there's a noticeable difference in how GC works, this is due to the change in the default GC engine, as detailed below.
Here it is, visually represented thanks to VisualVM, the difference in how the two GC engines operate:
Java8:
Java 11:
[From https://docs.gigaspaces.com/xap/14.0/rn/java11-guidelines.html]
Starting from Java 9, the default garbage collector (GC) was changed from Parallel GC to G1 (see JEP 248). This change has performance implications, as described in the JEP motivation:
“Limiting GC pause times is, in general, more important than maximizing throughput. Switching to a low-pause collector such as G1 should provide a better overall experience, for most users, than a throughput-oriented collector such as the Parallel GC, which is currently the default.”
In other words, the Parallel GC is optimized for throughput at the expense of longer GC pauses, whereas the new default G1 GC is optimized for shorter GC pauses at the expense of lower throughput.
GigaSpaces benchmarking confirms this assertion. We evaluated GigaSpaces products with the following Java configurations and results:
Use the following Java options to explicitly set a garbage collector:
-XX:+UseParallelGC
-XX:+UseG1GC
For more information about garbage collection in Java-based systems, see Oracle’s Garbage Collection Tuning Guide for Java 11.
Conclusion: When upgrading to Java 11, it is important to be aware of the new default GC mechanism, and to choose the one that best serves your application requirements. If your configuration already explicitly sets the GC mechanism, this GC will be the one used with Java 11.
Nome: Andrea
Cognome: Schiffo
Data e luogo di nascita: 6/9/86 a S.Daniele del Friuli
Residenza: Ciconicco di Fagagna (UD) - Italy
Studi: Laurea Triennale in Informatica presso Uniud
Occupazione: QA Automation Engineer @ Xanadu
Interessi: CICLISMO!, tecnologia/comunicazione, informatica, cultura, volontariato
NoSePolCrit Pet from Michele Colucci on Vimeo.
By A www.autson.com