-XX:+ExplicitGCInvokesConcurrent Disables Heap Shrinking at G1
Ruslan Synytsky
rs at jelastic.com
Sat Sep 19 06:39:03 UTC 2020
Hi, after analysis of one of the end user environments (JIRA), it looks
like specifying +ExplicitGCInvokesConcurrent disables memory uncommitment
even if you explicitly execute System.gc() or jcmd $pid GC.run.
java -version
*openjdk version "1.8.0_262"OpenJDK Runtime Environment
(AdoptOpenJDK)(build 1.8.0_262-b10)OpenJDK 64-Bit Server VM
(AdoptOpenJDK)(build 25.262-b10, mixed mode)*
jcmd $pid VM.flags
*-XX:CICompilerCount=3 -XX:ConcGCThreads=1 -XX:+ExplicitGCInvokesConcurrent
-XX:G1HeapRegionSize=1048576 -XX:GCLogFileSize=20971520
-XX:InitialCodeCacheSize=33554432 -XX:InitialHeapSize=402653184
-XX:MarkStackSize=4194304 -XX:MaxHeapFreeRatio=30
-XX:MaxHeapSize=3007315968 -XX:MaxNewSize=1803550720
-XX:MinHeapDeltaBytes=1048576 -XX:MinHeapFreeRatio=10
-XX:NumberOfGCLogFiles=5 -XX:-OmitStackTraceInFastThrow -XX:+PrintGC
-XX:+PrintGCCause -XX:+PrintGCDateStamps -XX:+PrintGCDetails
-XX:+PrintGCTimeStamps -XX:ReservedCodeCacheSize=536870912
-XX:+UnlockExperimentalVMOptions -XX:+UseCompressedClassPointers
-XX:+UseCompressedOops -XX:+UseFastUnorderedTimeStamps -XX:+UseG1GC
-XX:+UseGCLogFileRotation *
Min=384M
Used=654M
*Committed=1188M*
Max=2868M
The same application running without -XX:+ExplicitGCInvokesConcurrent
option has twice smaller Committed heap.
Min=384M
Used=431M
*Committed=598M*
Max=2868M
Is it an expected behavior?
Thanks
--
Ruslan Synytsky
CEO @ Jelastic Multi-Cloud PaaS
More information about the hotspot-gc-dev
mailing list