G1GC老一代承诺堆不断增长,使用时间恒定-导致伊甸园饥饿

G1GC的旧一代已提交堆随时间增加(在生产中大约需要5到6天),但是旧的旧堆却没有。 Eden和幸存者的堆被迫减少到最小(占总堆的5%),因此垃圾收集因为越来越频繁。该应用程序一开始就缓存一个大对象图,然后在其整个运行生命周期中进行其他时间/使用受限的缓存。它具有相当高的对象创建率,但是除了缓存的对象之外,它并没有将其提升到老一代。

I have run the GC log through gceasy.io and you can see the above behaviour of the memory: https://gceasy.io/my-gc-report.jsp?p=c2hhcmVkLzIwMjAvMDUvMTEvLS1nY2xvZy50YXIuZ3otLTExLTMwLTE5&channel=WEB.

gclog: https://drive.google.com/open?id=176X-Lku4D3DGCCdTiB0_z545N8n0tfKc

Grafana memory metrics for this run https://snapshot.raintank.io/dashboard/snapshot/k6g3ljG7cQUEJM7jA4c5tBK1dsUnzabd

Heap dump at end of run (load had been removed for about an hour, this is a 500M gz file): https://drive.google.com/open?id=14ghzIVnpelInSyQBhCwUwM5VkuOjX13-

我们似乎没有大量的对象创建。服务器有12G的RAM,堆有6G。

jvm:

openjdk version "1.8.0_242"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

jvm标志:

-XX:CICompilerCount=4
-XX:ConcGCThreads=2
-XX:G1HeapRegionSize=2097152
-XX:GCLogFileSize=104857600
-XX:InitialHeapSize=6442450944
-XX:InitialRAMPercentage=50.000000
-XX:+ManagementServer
-XX:MarkStackSize=4194304
-XX:MaxHeapSize=6442450944
-XX:MaxNewSize=3865051136
-XX:MaxRAMPercentage=50.000000
-XX:MinHeapDeltaBytes=2097152
-XX:MinRAMPercentage=50.000000
-XX:NumberOfGCLogFiles=10
-XX:+PrintGC
-XX:+PrintGCDateStamps
-XX:+PrintGCDetails
-XX:+PrintGCTimeStamps
-XX:+UseCompressedClassPointers
-XX:+UseCompressedOops
-XX:+UseG1GC
-XX:+UseGCLogFileRotation

我们在CentOS的openshift上运行:CentOS Linux版本7.7.1908(核心)

内核:3.10.0-1062.12.1.el7.x86_64

评论