我遇到了堆內存問題。日常內存增加了100MB,並繼續增加,在1.5GB的限制後運行FULL GC,但仍然沒有恢復。 檢查日誌後,看到CMS:中止預清潔?這可能是因素。 任何幫助表示讚賞。垃圾收集器:CMS中止預清潔問題?
CMS:因時間而中止預清潔?任何想法如何解決這個問題?
Enviornment:Java 1.6的
Here are my GC params:
-Dfile.encoding=UTF-8 \
-Duser.timezone=US/Eastern \
-Dsun.net.inetaddr.ttl=60 \
-Dsun.net.inetaddr.negative.ttl=60 \
-Xms1024m \
-Xmx1536m \
-Xss512k \
-verbose:gc \
-Xloggc:$CATALINA_BASE/logs/gc_log \
-XX:+DisableExplicitGC \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:+PrintGCDetails \
-XX:+PrintGCTimeStamps \
-XX:+UseConcMarkSweepGC \
-XX:+UseParNewGC \
-XX:CMSInitiatingOccupancyFraction=50 \
-XX:GCTimeRatio=99 \
-XX:MaxNewSize=512m \
-XX:MaxTenuringThreshold=30 \
-XX:NewSize=512m \
-XX:SurvivorRatio=6 \
-XX:TargetSurvivorRatio=90 \
**495747.455: [CMS-concurrent-mark-start]
495749.159: [CMS-concurrent-mark: 1.705/1.705 secs] [Times: user=1.91 sys=0.05, real=1.71 secs]
495749.159: [CMS-concurrent-preclean-start]
495749.166: [CMS-concurrent-preclean: 0.006/0.007 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
495749.166: [CMS-concurrent-abortable-preclean-start]
495752.728: [GC 495752.728: [ParNew: 432226K->29458K(458752K), 0.0462900 secs] 1419590K->1016821K(1507328K), 0.0464200 secs] [Times: user=0.08 sys=0.00, real=0.04 secs]
CMS: abort preclean due to time 495754.230: [CMS-concurrent-abortable-preclean: 2.067/5.063 secs] [Times: user=2.43 sys=0.11, real=5.06 secs]
495754.230: [GC[YG occupancy: 146431 K (458752 K)]495754.230: [Rescan (parallel) , 0.0446310 secs]495754.275: [weak refs processing, 0.0000080 secs] [1 CMS-remark: 987363K(1048576K)] 1133794K(1507328K), 0.0447400 secs] [Times: user=0.07 sys=0.00, real=0.05 secs]**
我試圖與2GB,但在到達極限之後:(併發模式故障):1048575K-> 1048296K(1048576K),5.4770550秒] 1506365K-> 1244278K(1507328K),[CMS彼爾姆:43867K- 43862K(76736K)],5.4773220秒] [時間:用戶= 5.40 sys = 0.02,實際= 5.46秒] 498938.770:[Full GC 498938.770:[CMS:1048442K-> 1048251K(1048576K),4.5968810sec] 1507194K-> 1252719K(1507328K),[CMS Perm:43870K-> 43866K(76736K)],4.5971510秒] [時間:用戶= 4.56 sys = 0.01,實際= 4.61秒] 498943.375:[GC [1 CMS-初始標記:1048251K (1048576K)] 1255332K(1507328K),1.1042510秒] [Times:user = 1.10 sys = 0.01,real = 1.10 secs] – Dhanu
AFAIK,這種情況發生在您宣傳物品的速度快於將物品清理乾淨時。年輕的空間有多大? –
-XX:MaxNewSize = 512m \這有助於年輕的空間。 – Dhanu