每隔几天我们就会看到连续的 Full GC(超过 1000 次 FullGC)然后应用程序恢复正常......详细的 GC 日志如下......是什么促使这个 Full Gc ?
环境/设置
JDK 1.6
内存设置 -Xms256M -Xmx2048M -XX:MaxPermSize=512M
正在附加到进程 ID 25118,请稍候... 已成功附加调试器。检测到服务器编译器。JVM版本是14.3-b01
使用线程局部对象分配。8 个线程的并行 GC
Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 2147483648 (2048.0MB)
NewSize = 2686976 (2.5625MB)
MaxNewSize = 17592186044415 MB
OldSize = 5439488 (5.1875MB)
NewRatio = 2
SurvivorRatio = 8
PermSize = 21757952 (20.75MB)
MaxPermSize = 536870912 (512.0MB)
404006.016: [GC [PSYoungGen: 242756K->10659K(249408K)] 609285K->378416K(825536K), 0.0244300 secs] [Times: user=0.09 sys=0.00, real=0.03 secs]
404126.211: [GC [PSYoungGen: 239715K->11421K(250624K)] 607472K->379300K(826752K), 0.0314540 secs] [Times: user=0.08 sys=0.01, real=0.03 secs]
404498.907: [GC [PSYoungGen: 241181K->15113K(250816K)] 609060K->383750K(826944K), 0.0567160 secs] [Times: user=0.11 sys=0.00, real=0.06 secs]
404559.340: [GC [PSYoungGen: 81552K->9784K(250688K)] 450190K->378571K(826816K), 0.0255340 secs] [Times: user=0.08 sys=0.01, real=0.03 secs]
404559.366: [Full GC (System) [PSYoungGen: 9784K->0K(250688K)] [PSOldGen: 368787K->225993K(576128K)] 378571K->225993K(826816K) [PSPermGen: 181648K->181648K(187968K)], 1.4180830 secs] [Times: user=1.42 sys=0.00, real=1.42 secs]
404560.791: [GC [PSYoungGen: 1155K->64K(251072K)] 227148K->226057K(827200K), 0.0141730 secs] [Times: user=0.03 sys=0.02, real=0.01 secs]
404560.806: [Full GC (System) [PSYoungGen: 64K->0K(251072K)] [PSOldGen: 225993K->202050K(576128K)] 226057K->202050K(827200K) [PSPermGen: 181648K->178996K(185216K)], 1.5066450 secs] [Times: user=1.50 sys=0.00, real=1.51 secs]
404562.329: [GC [PSYoungGen: 1351K->272K(252032K)] 203401K->202322K(828160K), 0.0129750 secs] [Times: user=0.03 sys=0.01, real=0.01 secs]
404562.342: [Full GC (System) [PSYoungGen: 272K->0K(252032K)] [PSOldGen: 202050K->202125K(576128K)] 202322K->202125K(828160K) [PSPermGen: 178996K->178996K(184512K)], 1.3184310 secs] [Times: user=1.32 sys=0.00, real=1.32 secs]
404563.674: [GC [PSYoungGen: 1146K->128K(253312K)] 203271K->202253K(829440K), 0.0106520 secs] [Times: user=0.02 sys=0.01, real=0.01 secs]
404563.685: [Full GC (System) [PSYoungGen: 128K->0K(253312K)] [PSOldGen: 202125K->202126K(576128K)] 202253K->202126K(829440K) [PSPermGen: 178997K->178997K(184000K)], 1.3197180 secs] [Times: user=1.32 sys=0.00, real=1.32 secs]
404565.025: [GC [PSYoungGen: 1146K->64K(254976K)] 203272K->202190K(831104K), 0.0152030 secs] [Times: user=0.03 sys=0.01, real=0.01 secs]
404565.041: [Full GC (System) [PSYoungGen: 64K->0K(254976K)] [PSOldGen: 202126K->202126K(576128K)] 202190K->202126K(831104K) [PSPermGen: 178997K->178997K(183296K)], 1.3072740 secs] [Times: user=1.31 sys=0.00, real=1.31 secs]
404566.355: [GC [PSYoungGen: 1151K->160K(255360K)] 203278K->202286K(831488K), 0.0107640 secs] [Times: user=0.02 sys=0.02, real=0.01 secs]