全GC当许多对象年龄> = 15但不是长寿命的对象时?
我的Java应用程序经常使用完整的GC 。
通过分析GC日志,我发现有许多年龄的物体= 15。我想许多物体在达到MaxteningThreshold = 15后已将其晋升为老年,这导致终身一代越来越大。最后,全GC 发生了。
但是,借助gceasy
工具,我发现旧一代还通过完整的GC回收了很多垃圾。大约2390-> 800。
原因是什么?是因为有很多年龄的物体> 15不属于终身一代?也许他们的年龄= 16,17,18?但是不是长寿命的对象吗?
这是我的JVM配置:
-Xmx6g
-Xms6g
-XX:NewRatio=1
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75
-XX:+UseCMSInitiatingOccupancyOnly
-XX:MaxTenuringThreshold=15
-XX:+ParallelRefProcEnabled
-XX:+CMSParallelRemarkEnabled
-XX:+UseCMSCompactAtFullCollection
-XX:+HeapDumpOnOutOfMemoryError
-XX:MetaspaceSize=512m
-XX:MaxMetaspaceSize=512m
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-Xloggc:/export/Logs/gc.log
-XX:+PrintTenuringDistribution
-XX:SurvivorRatio=4
/a>
在这种情况下,如何调整JVM?
谢谢你!
My java applications frequently use full GC.
By analyzing gc log, I found that there were many objects with age >= 15. I guess that many objects were promoted to the old age after reaching maxtenuringthreshold=15, which led to the tenured generation becoming larger and larger. Finally, full GC occurred.
But with the help of gceasy
tool, I found that the old generation also recycled a lot of garbage through full GC. About 2390 -> 800.
What is the reason? Is it because there are many objects with age > 15 that do not belong to the tenured generation? Maybe their age =16,17,18? But not long-live objects?
Here is my JVM configuration:
-Xmx6g
-Xms6g
-XX:NewRatio=1
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75
-XX:+UseCMSInitiatingOccupancyOnly
-XX:MaxTenuringThreshold=15
-XX:+ParallelRefProcEnabled
-XX:+CMSParallelRemarkEnabled
-XX:+UseCMSCompactAtFullCollection
-XX:+HeapDumpOnOutOfMemoryError
-XX:MetaspaceSize=512m
-XX:MaxMetaspaceSize=512m
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-Xloggc:/export/Logs/gc.log
-XX:+PrintTenuringDistribution
-XX:SurvivorRatio=4
In this case, how can I tune the JVM?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论