2

I found a GC problem in my application, young GC suddenly becomes 10 times as much as normal which result of a small size of eden region. Through the gc log, I found than eden size become 5000M-7000M usually while it keeped 528M when falled into problems. I don't know what happend cause such problem. I have read a lot of blogs to research the algorithm that adjust the eden region size, and most of the blog just tell me than the eden region size is automatically changed according to previous gc pause time. only a vaguely answer is found in https://product.hubspot.com/blog/g1gc-fundamentals-lessons-from-taming-garbage-collection,

if (recent_STW_time < MaxGCPauseMillis)

eden = min(100% - G1ReservePercent - Tenured, G1MaxNewSizePercent)

else

eden = min(100% - Tenured, G1NewSizePercent)

But according to this, eden region size should be 4000-6500M in my application.

zbliu
  • 21
  • 1
  • 1
    It would be good if you can provide all the gc/memory flags for your application and exact version of jre you are using. – Artur Biesiadowski May 21 '18 at 07:23
  • thank you for your reply. JVM_OPTS="-XX:+UseG1GC -Xmx12G -Xms12G -XX:ParallelGCThreads=10 -XX:InitiatingHeapOccupancyPercent=35 -XX:G1ReservePercent=15 -XX:ConcGCThreads=8 -XX:G1HeapRegionSize=8m -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$LOGS_DIR/gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$LOGS_DIR/heapdump.hprof -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M" – zbliu May 21 '18 at 07:42
  • Java(TM) SE Runtime Environment (build 1.8.0_111-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode) – zbliu May 21 '18 at 07:44

0 Answers0