Reputation: 1013
After analyzing the performance issues of an application, following points were noted.
I tried to collect more details about G1, but still a few questions left unanswered. Please help if you can.
Upvotes: 3
Views: 3072
Reputation: 417
I have provided the documentation where it is explained that G1 uses something called mixed collections.
http://blog.sysco.no/files/guides/JVMGarbageCollectionV1.1.pdf
Upvotes: 0
Reputation: 417
Regarding your first question. The idea behind garbage collector implementations as G1 is to minimize and even to avoid the execution of full or major garbage collections since this is an stop the world event whose complexity generates longer pauses and consumption of CPU. Even when I am using the throughput GC, I am always trying to reduce the number of full garbage collections so I would say, it is really good that your system is running without executing full GCs.
What is more, keep in mind that if you are using a JDK lower than version 10, the execution of the Full GC with G1 is going to use just one thread as I pointed on this post.
By the way, it seems to be the newest version of Java (10) is going to include a G1 with the capability of executing Full GCs in parallel.
Regarding your second question. The memory is cleaned using the minor GC and this why you can see a reduction on the heap consumption.
On this document you can find a detailed explanation about G1.
http://blog.sysco.no/files/guides/JVMGarbageCollectionV1.1.pdf
The Dude
Upvotes: 1