G1收集器没有进行完整的GC [英] G1 Collector not doing full GC
问题描述
切换到java 1.7.0_80一周后,观察到这种行为
S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT
0 32M 0 32M 512M 128M 9.5G 7.7G 640M 475M 26487 157min 0 0min 157min
没有完整的GC,分配给老一代的大空间以及年轻一代发生的太多集合。
通过JMX调用完整GC后
GC时间减少了很多。 参数是 可能是因为-XX:MaxGCPauseMillis = 100? 旧一代中的很多对象都在ehcache中,TimeToIdle为10分钟,但如果在到期后没有请求相同的对象或者缓存未满,ehcache不会清除对象。 我的高级算术技能告诉我,10GB的80%是8GB。 小于8。 因此不会启动并发循环。设置一个较低的IHOP或者不要明确设置,以便G1可以在运行时自动调整它。 For a week after switching to java 1.7.0_80, observed this behavior No Full GC, large space allocated to old generation and too many collections happening in young generation. After invoking full GC via JMX And GC times reduced a lot. Parameters are Could it be because of -XX:MaxGCPauseMillis=100? Lot of objects in old generation are held in ehcache with TimeToIdle of 10 mins but ehcache does not clean up objects if same objects is not requested after expiry or if cache is not full. My advanced arithmetic skills tell me that 80% of 10GB is 8GB. That's less than 8. Therefore no concurrent cycle will be initiated. Set a lower IHOP or don't set it explicitly so G1 can adjust it automatically at runtime. 这篇关于G1收集器没有进行完整的GC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT
0 32M 0 32M 5.2G 768M 4.8G 2.7G 640M 475M 26592 158.4min 1 0.1min 158min $ c
-Xms10g
-Xmx10g
-XX:PermSize = 640m
-XX:MaxPermSize = 640m
-XX :SurvivorRatio = 30
-XX:MaxTenuringThreshold = 15
-XX:+ UseG1GC
-XX:MaxGCPauseMillis = 100
-XX:InitiatingHeapOccupancyPercent = 80
-XX: G1HeapRegionSize = 32m
-XX:ParallelG CThreads = 16
-Xmx10g -XX:InitiatingHeapOccupancyPercent = 80
OU 7.7G $ c $
S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT
0 32M 0 32M 512M 128M 9.5G 7.7G 640M 475M 26487 157min 0 0min 157min
S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT
0 32M 0 32M 5.2G 768M 4.8G 2.7G 640M 475M 26592 158.4min 1 0.1min 158min
-Xms10g
-Xmx10g
-XX:PermSize=640m
-XX:MaxPermSize=640m
-XX:SurvivorRatio=30
-XX:MaxTenuringThreshold=15
-XX:+UseG1GC
-XX:MaxGCPauseMillis=100
-XX:InitiatingHeapOccupancyPercent=80
-XX:G1HeapRegionSize=32m
-XX:ParallelGCThreads=16
-Xmx10g -XX:InitiatingHeapOccupancyPercent=80
OU 7.7G