性能问答>项目发布期间,防止老年代快速飙升>
2回复

项目发布期间,防止老年代快速飙升



项目刚启动时候,老年代有一波飙升,看着这次ygc就有400m左右进入老年代。我理解即使放到Eden区也没有必要直接丢到老年代,想请教下 能防止进入吗。

{Heap before GC invocations=9 (full 0):
 par new generation   total 3774912K, used 3774911K [0x000000066d800000, 0x000000076d800000, 0x000000076d800000)
  eden space 3355520K, 100% used [0x000000066d800000, 0x000000073a4e0000, 0x000000073a4e0000)
  from space 419392K,  99% used [0x0000000753e70000, 0x000000076d7ffff0, 0x000000076d800000)
  to   space 419392K,   0% used [0x000000073a4e0000, 0x000000073a4e0000, 0x0000000753e70000)
 concurrent mark-sweep generation total 1351680K, used 397274K [0x000000076d800000, 0x00000007c0000000, 0x00000007c0000000)
 Metaspace       used 149618K, capacity 150822K, committed 151296K, reserved 1185792K
  class space    used 14282K, capacity 14547K, committed 14592K, reserved 1048576K
2019-11-13T10:18:47.160+0800: 63.536: [GC (Allocation Failure) 63.536: [ParNew
Desired survivor size 214728704 bytes, new threshold 1 (max 15)
- age   1:  302585232 bytes,  302585232 total
: 3774911K->419392K(3774912K), 0.4322398 secs] 4172186K->1241808K(5126592K), 0.4324788 secs] [Times: user=1.57 sys=0.35, real=0.43 secs]
Heap after GC invocations=10 (full 0):
 par new generation   total 3774912K, used 419392K [0x000000066d800000, 0x000000076d800000, 0x000000076d800000)
  eden space 3355520K,   0% used [0x000000066d800000, 0x000000066d800000, 0x000000073a4e0000)
  from space 419392K, 100% used [0x000000073a4e0000, 0x0000000753e70000, 0x0000000753e70000)
  to   space 419392K,   0% used [0x0000000753e70000, 0x0000000753e70000, 0x000000076d800000)
 concurrent mark-sweep generation total 1351680K, used 822416K [0x000000076d800000, 0x00000007c0000000, 0x00000007c0000000)
 Metaspace       used 149618K, capacity 150822K, committed 151296K, reserved 1185792K
  class space    used 14282K, capacity 14547K, committed 14592K, reserved 1048576K
}

jvm配置如下

-XX:+CMSClassUnloadingEnabled 
-XX:CMSFullGCsBeforeCompaction=9 
-XX:CMSInitiatingOccupancyFraction=80 
-XX:+CMSParallelRemarkEnabled 
-XX:+DisableExplicitGC 
-XX:ErrorFile=/opt/logs/waimai_c_api_service/waimai_c_api_service.vmerr.log 
-XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses 
-XX:-HeapDumpOnOutOfMemoryError 
-XX:InitialCodeCacheSize=134217728 
-XX:InitialHeapSize=5678039040 
-XX:MaxHeapSize=5678039040 
-XX:MaxMetaspaceSize=402653184 
-XX:MaxNewSize=4294967296 
-XX:MetaspaceSize=402653184 
-XX:NewSize=4294967296 
-XX:OldPLABSize=16 
-XX:+PrintGC 
-XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCDateStamps 
-XX:+PrintGCDetails 
-XX:+PrintGCTimeStamps 
-XX:+PrintHeapAtGC 
-XX:+PrintTenuringDistribution 
-XX:-ReduceInitialCardMarks 
-XX:ReservedCodeCacheSize=134217728 
-XX:+ScavengeBeforeFullGC 
-XX:SoftRefLRUPolicyMSPerMB=0 
-XX:SurvivorRatio=8 
-XX:ThreadStackSize=512 
-XX:+UseCMSCompactAtFullCollection 
-XX:+UseCMSInitiatingOccupancyOnly 
-XX:+UseCompressedClassPointers 
-XX:+UseCompressedOops 
-XX:+UseConcMarkSweepGC 
-XX:+UseParNewGC
3707 阅读
请先登录,查看2条精彩评论吧
快去登录吧,你将获得
  • 浏览更多精彩评论
  • 和开发者讨论交流,共同进步